Flow Forms Docs Flow Forms Docs

Conditional Logic

On this page 9

Conditional logic hides a field until an earlier answer makes it relevant. A form that would otherwise ask everyone everything instead asks each person only what applies to them, which makes it shorter and easier to finish.

In Flow Forms, the logic lives in named, reusable rules. A rule watches one or more fields, and any number of fields can be attached to it: they are visible only while the rule is true. Build the rule once - "Payment type is equal to Check" - and attach every check-related field to it.

Building a Rule

  1. In the form builder, click the rules button (or pick Create Rule from a field's context menu to start from that field).
  2. In the Rules modal, click + to create a new rule.
  3. On the Conditions tab, add one or more clauses: the form element to watch, the comparison, the value, and - from the second clause on - an and/or connective. Click Save Condition.
  4. On the Available Elements tab, pick the fields this rule should reveal.

The modal summarizes each rule as If ... then show ..., which is exactly how it behaves: the attached fields are hidden until the rule is met.

To attach one field to an existing rule without opening the whole modal, use the field's Edit Visibility option and choose the rule from the list.

Comparisons

Comparison Matches when the watched field
is equal to Exactly matches the value
is not equal to Is anything other than the value
is greater than Is numerically above the value
is greater than or equal to Is numerically at or above the value
is less than Is numerically below the value
is less than or equal to Is numerically at or below the value
contains Contains the value somewhere in its text
does not contain Does not contain the value anywhere in its text
is empty Has no value
is not empty Has any value at all

is empty and is not empty are the two that take no comparison value; the box for it disappears when you pick either.

A note on checkboxes: a checkbox holds every option the respondent ticked, so comparisons check each ticked option. is equal to "Blue" is true when Blue is among the choices, whatever else is ticked alongside it - and is not equal to "Blue" is false the moment Blue is ticked. Reach for contains when writing checkbox rules; it says what you mean.

What Can Be Watched

Rules watch fields that hold a fill-out value. Content, Group, File Upload, and Signature fields cannot trigger a rule - though they can all be shown or hidden by one. One boundary to know: a field inside a repeating group can only control other fields in its own group.

What to Use It For

Asking Follow-Up Questions

Keep the detail out of sight until it is needed. If "Do you have allergies?" is answered Yes, show the field asking which ones. If payment type is Check, show the check number field.

Branching

Send different people down different paths. A form serving several kinds of respondent can ask each group its own set of questions, and skip the sections that do not apply. Because one rule can reveal many fields, a whole branch is usually a single rule.

Varying What Is Required

A field only has to be filled in when it is showing, so a condition can make a question mandatory in some circumstances and absent in others. Ask for a phone number only on urgent requests, or for supporting documentation only above a certain amount.

Tips

  • Keep each rule simple. Several straightforward rules are easier to follow later than one intricate one.
  • Name rules for what they mean ("Is paying by check"), not what they compare.
  • Fill the form in yourself along every path, including the ones that only some respondents reach.
  • When a field appears partway through, its help text should explain why it is being asked.
  • Do not hide anything a respondent needs to see behind a condition they might not meet.