Within this guide, we will see how to create conditional fields on forms.
What are conditional fields?
Conditional fields are those fields that appear on forms in relation to the data entered in other fields of the same form.
Before understanding how to create a conditional field if you want to understand how to create a form from scratch, I invite you to consult the dedicated guide by clicking here.
Let's start!
Let's assume we have a contact acquisition form, like the one shown in the following figure, and we would like the Surname field to appear only when the user enters the name Mario in the Name field.
Firstly, we should navigate to the Form section within the main menu of Framework 360 by following these steps:
Website > Form
At this point, we click on the form we wish to edit and go into the Created Fields and click on the Surname field.
Once clicked on the Surname field, the field editing screen will open where we will find the entry Apply Conditions as shown in the figure:
If we click on Apply Conditions, Framework360 will allow us to select, through the entry Field Visibility Conditions, one of the other fields in the form and will ask us to set the visibility condition for the Surname field as shown in the figure:
In our example, we will insert that the Name field be equal to Mario and click on the Save button at the top right.
At this point, if we returned to our form, we would see that the Surname field is no longer visible and it will become visible again only when the user enters Mario in the Name field.
This feature could be very useful, for example, in a hotel room reservation form where there is initially an item asking for the number of children and, only when the number of children is entered, fields to input the respective names of the children will appear.