Skip to content

Conditional logic ​

Conditional logic shows a field only when it's relevant. For example, ask about dietary needs only when someone attends in person:

Add a rule ​

  1. Select the field that should appear or disappear, and open Conditional logic.
  2. Tick Enable conditional logic.
  3. Choose Show this field or Hide this field, and whether all or any conditions must be met.
  4. Set the condition: a field, a comparison and a value. Add condition adds another.
The Dietary needs field set to show when Attendance equals In person

The section's summary in the field settings says Always shown for a field without rules.

ComparisonTrue when the answer…
equals, does not equalis exactly the value, or anything else
contains, does not containincludes the value somewhere, or doesn't
is greater than, is less thanis a number above or below the value
is empty, is not emptyis blank, or has any answer

For checkboxes, the answer is the list of ticked options, so contains checks whether one of them is ticked.

What visitors get ​

  • Fields change as soon as the answer changes, without reloading the page.
  • A hidden field is never required, and whatever it held isn't stored, emailed or sent anywhere.
  • NXForms checks the rules again on the server, so a field hidden on the page can't be sent anyway.

Rules on steps ​

In a multi-step form, whole steps can follow rules too: see Multi-step forms.