Skip to main content

Conditional logic in forms

Learn how to show or hide form questions and set default values based on what a respondent enters.

Note: This article covers forms in the new document creation experience. If your workspace hasn't been updated yet, see Create forms (classic experience).

By default, every question in your form is visible to anyone who opens it. Conditional logic lets you build rules that show or hide specific questions — and set default values — based on what a person enters. This keeps your form focused and avoids asking for information that isn't relevant.

How rules work

Each rule follows a WHEN / THEN / ELSE structure:

  • WHEN — one or more conditions based on a question's value

  • THEN — actions to take when all conditions are met

  • ELSE — alternate actions when conditions are not met

Each action can show or hide a question, show or hide an option within a choice field, or pre-fill a field with a value.

Important: All questions are visible by default. Rules hide questions that are currently shown — they don't reveal questions that were hidden at setup. Plan your logic around the "hide when not applicable" pattern.

Open the form rules panel

  1. Open your template and select Edit form to enter the form editor.

  2. Select the expand icon (crossed arrows) in the top bar. The Form rules panel opens on the right.

  3. Select + Create rule to add your first rule.

Create a rule

1. Add a condition (WHEN)

  1. In the rule editor, select + Add condition under WHEN.

  2. Select the question you want to base the condition on. The dropdown lists all questions in your form by their label.

  3. Select an operator.

  4. Enter a value if the operator requires one.

The operators shown depend on the type of question you select.

Text questions (Short text, Long text, Email, Phone number):

Operator

When it triggers

equal

The response exactly matches the value

not equal

The response does not match the value

contains

The response includes the string

contains exact word

The response includes the exact word

doesn't contain

The response does not include the string

starts with

The response begins with the value

ends with

The response ends with the value

empty

The field has no value

not empty

The field has any value

Number questions:

Operator

When it triggers

equal

The value exactly matches

not equal

The value does not match

greater than

The value is above the number

less than

The value is below the number

greater than or equal to

The value is at or above the number

less than or equal to

The value is at or below the number

Multiple-choice, Dropdown, and Checkboxes questions:

Operator

When it triggers

equal

The selected option matches

not equal

The selected option does not match

is empty

No option has been selected

is not empty

Any option has been selected

Note: To check multiple conditions, select + Add condition again. All conditions in a single rule must be met for the THEN actions to run. Verify AND/OR behavior in the UI — this needs production confirmation before publishing.

2. Add an action (THEN)

  1. Select + Add action under THEN.

  2. Choose an action from the list.

Action

What it does

Show question

Makes a question visible

Hide question

Hides a question from view

Show option

Shows a specific option in a Multiple-choice, Checkboxes, or Dropdown question

Hide option

Hides a specific option in a Multiple-choice, Checkboxes, or Dropdown question

Set default value

Pre-fills a question with a specific value when the condition is met

  1. Select the question (or option) to apply the action to.

3. Add an ELSE action (optional)

The ELSE section runs when the WHEN conditions are not met. Use it to reverse an action — for example, hide the question when the condition is not met and show it when it is.

Select + Add action under ELSE and choose from the same action set.

4. Save the rule

Select Save rule. The rule appears in the Form rules list. You can return to it at any time to edit or delete it.

Example: hide a question unless another is filled in

Goal: Only show "Client SSN" when the user has entered something in "Client middle initial."

Section

Setting

WHEN

Client middle initial — not empty

THEN

Show question → Client SSN

ELSE

Hide question → Client SSN

With this rule, "Client SSN" stays hidden until the person enters a middle initial.

Tips for conditional logic

  • Use ELSE to clean up hidden state. If you show a question in THEN, hide it in ELSE so it returns to its hidden state when the condition is no longer met.

  • Use "Set default value" to reduce typing. If a condition implies a predictable answer, pre-fill it — the user can still change it.

  • Order matters. Rules run in the order they're listed in the Form rules panel. If two rules affect the same question, the last one applied wins.

Did this answer your question?