Controlling the flow with conditions and logic

Modify your flow's behavior using answers collected.

Conditional logic allows you to create dynamic, personalized flows without duplicating efforts across multiple form versions. You can use logic to control when certain elements appear based on responder inputs.

Logic can be applied to:


Content order and conditional logic

Responders experience the flow according to the step order defined in the Content Editor—from Step 0 onward. Conditional logic doesn’t override this order, but it can hide or reveal elements based on logic that evaluates to true or false.

  • If the logic evaluates to true, the element is shown.

  • If it evaluates to false, the element is hidden.

Example flow:

Step 1: Do you have a cat or a dog?

  • If the responder selects Cat: logic on Step 2 evaluates to true → Step 2 is shown, Step 3 is hidden.

  • If the responder selects Dog: logic on Step 2 evaluates to false → Step 2 is hidden, Step 3 is shown.

This simple pattern allows you to branch the experience without creating a separate flow.

Simple logic editor

The Simple Logic Editor enables basic conditional rendering using one or more logical arguments.

Each condition consists of:

  • A variable (e.g., answer, external variable)

  • A logical operator (see the operator reference below)

  • A target value to compare against

Using the simple logic editor to conditionally render the first step

You can:

  • Add multiple conditions using + Add condition

  • Group conditions using + Add group for more complex logic

Creating a two-argument AND statement in the logic editor

If you find yourself needing more flexibility, consider using calculated variables or the advanced logic editor.

Advanced logic

Advanced logic allows you to create boolean expressions across multiple answers using a freeform logic editor.

For even more control, use a calculated variable that returns a true or false value using TypeScript. This boolean value can then be referenced by simple logic elsewhere in the flow.


Optional?

By default, Formsort flows require all questions to be answered before moving forward. Toggling on Optional? allows responders to skip a question.


Logical operator reference

Logical operators evaluate expressions to determine whether a question, step, or group should be enabled.

Operator
Description

Equals

The value exactly matches the expected value.

Does not equal

The value does not match. Also true if the value is undefined.

Greater than

The value is greater than the expected value. (Numbers only)

Less than

The value is less than the expected value. (Numbers only)

Matches regular expression

The value matches the regex pattern.

Does not match regular expression

The value does not match the regex pattern.

Is defined on load

The value was set via URL param, POST body, or similar on form load.

Is defined

Any value (including false) is present. Useful for gating logic.

Is not defined

The value has not been set.

Had a loading error

The value couldn’t be loaded or computed due to an error (e.g., API failure).

Last updated

Was this helpful?