Using Conditional Logic to Show & Hide Form Fields
Forms in Clarityflow are very useful for a wide variety of things. This article covers their most powerful feature—conditional logic.
First, for the full background on how to use Forms, see:
The following shows how you can add conditional logic to make your forms even more powerful.
Hiding or showing a form field by default
By default, any new form field you add into your Form (in the Form builder) is shown to users by default.
If you want a field to be hidden by default (and revealed only when certain conditions are met):
Edit the form field
Click "Settings"
Enable conditional logic
Select "Hidden by default" to show the field only when the conditions have been met.
Setting up conditional logic rules
When you set up a conditional logic rule on a field, it can be based on any of the following:
"Another field…" Lets you have other fields in this form control this form's visibility. For example, when a person answers "ABC" into another field, then show this field.
"This conversation…" If this form is being viewed within a conversation, then this will let you base this field's visibility on settings from that conversation. For example, show this field only when we're in a private conversation, or only when we're in a course enrollment, etc.
"The person viewing this form…" Base this field's visibility on attributes of the person viewing it (filling it out). For example, you can base it on whether this person has made a purchase, is logged in, has completed a task, etc.
After you select one of these options to base your rule on, additional options will appear for configuring it.
Applying multiple conditional logic rules to a field
You can apply more than one condition under which a field should be shown or hidden. Simply add multiple conditional logic rules to the field.
Be sure to select "Any" or "All" according to how you want the logic to work:
"Any" means that if any one rule's conditions are met, then the showing or hiding will be applied.
"All" means that all rules conditions must be met in order for the showing or hiding to be applied.
Learn more about Clarityflow.