Skip to content

Conditional logic

A rule changes the form while someone is answering it: what appears, what is required, and where they go next.

Updated

Open the form, then Logic in the builder. Every rule for that form lives in one list, and the list is read from the top down.

Add a rule and choose its trigger

Every rule is one sentence: a trigger, then conditions, then actions.

  1. Click Add rule.
  2. Choose the trigger: While answering or After a page.
  3. Click Add condition and pick the question, the operator and the value.
  4. Click Add action and pick what happens.
The OG Forms Logic page in its empty state, reading No rules yet with the Add rule button below it and the builder tabs above
A new form starts with no rules. The list fills as you add them.

Pick the trigger that allows your action

The trigger decides which actions are available. This is the part people get wrong, so it is worth reading twice.

TriggerWhen it runsActions it allows
While answeringAs answers change, on the page the person is on.Show, Hide, Require
After a pageWhen someone moves on from a page.Go to, End form

A form that only asks the next question when it is relevant is shorter, and a shorter form is one more people finish. The point of a rule is that nobody sees a question that does not apply to them.

Write conditions the answer can meet

A condition compares one answer to a value, and the operators follow the question type.

  • A date asks about before and after.
  • A number asks about greater and less than.
  • A choice asks about is and is not.

Two conditions in one rule form a group, read as all of them or any of them. Group them as all when the rule needs every fact to be true, and as any when one of several answers should trigger it.

Choose what the rule does

ActionWhat changes on screen
ShowReveals a question or a page that is hidden by default.
HideTakes it out of the way while the rule holds.
RequireMakes a question required, which is how a field is required for some answers only.
Go toSkips ahead to a page, the usual way to branch.
End formSubmits here and skips the rest.

One rule can carry several actions, and they run in the order they are listed. To make a question required in general rather than for some answers, use question settings.

Test a rule before you send it

A rule that cannot run is flagged on the rule that needs fixing. Look for a target that no longer exists, a jump that loops, a step nothing reaches, or an action in the wrong trigger.

Then open Preview and answer the form the way a respondent would. A rule that reacts as answers arrive can only be judged that way.

Built to never let you down.

Create unlimited forms, surveys and quizzes with confidence.