Conditional Logic
Conditional logic shows or hides a field, or a whole row of columns, based on what the visitor has answered. A hidden field is not required, and its value is cleared, so it is not sent with the entry.
Set up a condition
- In the editor, select the field you want to show or hide.
- In Field Options, turn on Enable Conditional Logic.
- Choose the Condition Match:
- All: show the field only when every condition is true.
- Any: show the field when at least one condition is true.
- Click Add Condition and choose:
- the field to check,
- a comparison,
- the value (picked from the list for choice fields, typed for others).
- Save the form and test it with Preview.
Comparisons
| Comparison | True when the answer… |
|---|---|
| Is equal to | matches the value exactly. |
| Is not equal to | is anything else. |
| Contains / Does not contain | includes / does not include the text. |
| Starts with / Ends with | begins / ends with the text. |
| Is greater than / Is less than | is a bigger / smaller number. |
| Is empty / Is not empty | was left blank / was filled in. |
Example: ask for a phone number only when needed
- Add a Radio Buttons field, How should we contact you?, with the choices Email and Phone.
- Add a Phone Number field and make it required.
- On the Phone Number field, turn on conditional logic: All · How should we contact you? · Is equal to · Phone.
The phone field now appears only for visitors who choose Phone, and it is only required for them.
What conditional logic works with
- Every input field, including checkboxes, toggles, colour swatches and calculations.
- Fields with a custom Name Attribute.
- Whole column rows: set the condition on the column layout to hide every field inside it.
You need at least two fields to use conditional logic. If the panel says Add other fields to your form first, add the field you want to check against.
