In this guide, we will explain how to customise Formyoula Select field dependencies. If you have any questions, please email us email@example.com.
To create a Select List field dependency, please open the form builder and edit an existing select list or create a new Select List field on your form. After clicking on the pencil icon, you will see a section called "Field Dependency".
You can define Field Dependencies by clicking on the section title. This will open the Field Dependency JSON configurator.
If the text area is empty, this means there are no select list dependencies, and the select list will always display all available, select options on the form. You can add one or multiple field dependencies based on other Select List fields on your form. A single Dependent Select List can have multiple Controlling Select Lists.
The Select List Dependency logic has the following JSON structure:
Controlling Field ID -> Controlling Field Select Option -> Dependent Field Select Options
For example, we can find the Controlling Field ID by editing any Select List field on our form that we want to use as one of the Controlling Select List fields.
In our example the Controlling Field ID is "73c2-4443-1a48" and the Controlling Field Select List Options are "Select One, Select Two, Select Three". This means we can define what Select Options will be displayed for each of the Controlling Field select options.
If our Dependent Select List has the following options available - "Select A, Select B, Select C".
We can create our first Field Dependency that looks like this:
"73c2-4443-1a48" -> "Select One" -> "Select A, Select C"
Please use a JSON validator to make sure you are following the correct JSON syntax - https://jsonlint.com/
When you save the Dependent Select List edits you will see the following results on your mobile or online survey.
No Select List Options will be displayed on the Dependent Select List of the correct option is not selected on the Controlling Select List. When the correct option is selected, the Dependent Select List will display the available options.
For any questions, please contact us - firstname.lastname@example.org or the Formyoula in-app chat :)