Conditional logic means executing an action only if a condition is met, for example when the user select and option or fill the form in a certain way. There are many features that support conditional logic for example:
- Showing/Hiding fields
- Custom Validations
- Redirecting the user to a page after submission
The conditional logic builder has 3 main sections :
1: Select the field that you want to compare
2: Select the comparison type (like “Equal To” or “Greater Than”)
3: Select the value that you want to compare
In the example bellow the condition is checking if the email field has the value “email@example.com”
Creating comparisons with multiple fields
You can also execute comparisons with multiple fields, there are two types of multiple comparisons.
In the “And” comparison all the comparisons that you add should be met. For example, in the screenshot bellow the conditional logic will be executed only if the Email is “firstname.lastname@example.org” AND the Checkbox field has the “Option 2” selected.
If for example email is “email@example.com” but the checkbox field doesn’t has the “Option 2” selected then the conditional logic is not executed because it doesn’t met the two conditions.
To create the “And” comparisons click in the “And” button
In the “Or” comparisons the condition is going to be executed if at least one comparison is met. In the example bellow the conditional logic is going to be executed if Email is firstname.lastname@example.org OR Checkbox has “Option 2” selected.
If both conditions are met (Email is email@example.com and Checkbox has the “Option 2” selected) the condition is also going to be executed because the only requirement to execute an “Or” condition is that at least one condition is met.
To create “Or” conditions click in the “Add new group” button