Conditional Visibility
Last updated
Last updated
This is a powerful and popular feature and is useful for anybody building typical input forms. The main principles behind this parameter are to show or hide fields based on the values of other fields. An example might a simple name and address form, where you only want to ask certain questions based on their location. These questions would not appear if the location was not the one required.
It's important to note, when the field is hidden as a result of this parameter then it is considered not to exist on the form. This is by design to give you more control over how the form behaves. This means it wont be affected by rules or other actions happening on the form. If you wish to hide fields but keep the functionality for them in the bloc then use the field visibility setting Visually Hide in the form but remain functional.
The default option when this is not set is that all fields must equal their values. You can use this setting to decide that you only require at least one of the fields to equal their values.
We can use this option to toggle the behaviour that we want to happen when the values are met or not.
Option | Behaviour |
Show the field | If the criteria is met, i.e. if the values equal what they need to equal then allow this field to appear. |
Hide the field | If the criteria is met, i.e. if the values equal what they need to equal then prevent this field from appearing. |
Here we can begin to add the fields and the values they must be equal to for our criteria set out above to be met.
[blocworx-any-word] is our built in "wildcard" value, what this means is that the field can equal any value at all and it will consider the criteria to be met. By Clicking "Tick for any value" it automatically populates the value required with this wildcard value.