Required If Visible Option

There are many times when I have components within hidden containers that I want to be required only if the parent container (and thus the component itself) is visible. This leads to having a lot of semi-duplicative inverse code snippets in the hidden and required fields. This is because the logic in the hidden field is "HIDE IF TRUE", while the required logic is "REQUIRE IF TRUE". Thus, if I want to have it required if shown I need to have an expression that evaluations to false in the "hidden" field and true in the "required" field.

A much simpler user interface although I understand it would be harder to implement on the back-end due to the inherited nature of the hidden value (e.g. a component within a hidden container is hidden even) would be to have an option "Required if Visible" that, when toggled on would mean the component is automatically required if it is visible to the user and not required if it is not shown.

1 Like