Conditional Visibility for Category/Subcategory dropdowns.
I have a page with 1 Category dropdown, and 2 Subcategory dropdowns. Both Subcategory dropdowns are linked to the sme parameter, but has different values inside because they are created using Dynamic Enum Picker (a dropdown widget that allows you to show not all enumeration values in the dropdown, this way I can show only those subcategories that are relevant to a category). When I select a Category, these corresponding subcategory dropdown will appear, depending on the category I select (conditional visibility). The Save button should appear only if some subcategory has been selected ($currentObject/Subcategory != empty). The problem is the following: If I select a Category and then a sub Category, the save button will appear as it should. But if I will change the Category, a different Subcategory dropdown will appear, where no subcategory option has been selected yet – but the Save button will remain visible, because its subcategory value has already been set. How can I overcome this issue? How can I make subcategory value reset to empty if I select a different category?
In Onchange of category you have to clear any subcategories associated in that entity. Then it must work.