> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbitforms.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Conditional Logic

> Show or hide fields based on user answers to create dynamic, personalized flow form experiences.

Show or hide fields based on user answers to create dynamic, personalized flow form experiences.

<Info>
  **Available in Flow Forms**

  Conditional logic is available for Flow Forms, allowing you to create branching, conversational experiences.
</Info>

## What is Conditional Logic?

Conditional logic lets you control which fields appear based on previous answers. This creates shorter, more relevant forms that adapt to each user. Fields that don't meet their conditions are automatically skipped during navigation.

<CardGroup cols={2}>
  <Card title="Show Field" icon="eye">
    Display a field only when conditions are met. Hidden by default until triggered.
  </Card>

  <Card title="Hide Field" icon="eye-slash">
    Hide a field when conditions are met. Visible by default until triggered.
  </Card>
</CardGroup>

## Example Use Case

**Contact Form with Role-Based Questions**

* **Question 1:** What describes you best?
  * Options: Customer, Partner, Developer

* If "Developer" is selected, show:
  * **Question 2:** What's your tech stack?
  * Only shown when "Developer" is selected

When a user selects "Customer" or "Partner", they skip straight to the next relevant question.

## How to Set Up Conditional Logic

<Steps>
  <Step title="Open the Flow Form editor">
    Navigate to your form and click "Edit" to open the form builder
  </Step>

  <Step title="Select a field">
    Click on any field (except the first one) in the left sidebar to select it
  </Step>

  <Step title="Find the Logic section">
    Scroll down in the right sidebar to find the "Logic" section with the branch icon
  </Step>

  <Step title="Add a condition">
    Click "+ Add condition" to create your first rule
  </Step>

  <Step title="Configure the rule">
    Choose the trigger field, select an operator, and enter the value to match
  </Step>
</Steps>

## Combining Multiple Conditions

You can add multiple conditions to a single field. Use the logic type dropdown to control how conditions are combined:

<CardGroup cols={2}>
  <Card title="ALL conditions">
    All conditions must be true (AND logic). Field shows only when every condition matches.

    *Example: Show if role = "Developer" AND experience = "Senior"*
  </Card>

  <Card title="ANY condition">
    At least one condition must be true (OR logic). Field shows when any condition matches.

    *Example: Show if role = "Developer" OR role = "Designer"*
  </Card>
</CardGroup>

## Available Operators

| Operator             | Description                                    |
| -------------------- | ---------------------------------------------- |
| **Equals**           | Field value matches exactly (case-insensitive) |
| **Does not equal**   | Field value does not match                     |
| **Contains**         | Field value contains the specified text        |
| **Does not contain** | Field value does not contain the text          |
| **Is empty**         | Field has no value or is blank                 |
| **Is not empty**     | Field has any value                            |
| **Greater than**     | Number is greater than value                   |
| **Less than**        | Number is less than value                      |
| **Is selected**      | Option is selected in multi-select fields      |
| **Is not selected**  | Option is not selected in multi-select         |

## Smart Features

### Smart Value Selection

When you reference a multiple choice, dropdown, or checkbox field, the value input becomes a dropdown showing all available options from that field.

### Dynamic Progress

The progress bar and step counter automatically update based on visible fields. If conditional logic hides 3 fields, users see the correct "2 of 5" instead of "2 of 8".

### Instant Evaluation

Conditions are evaluated in real-time as users answer. When selecting a choice option, the form immediately knows which field to show next.

## Best Practices

<Tip>
  * Only reference fields that appear BEFORE the conditional field
  * Test your form by going through all possible paths
  * Use clear, descriptive field labels to make conditions readable
  * Start simple with one condition, then add complexity as needed
</Tip>

<Warning>
  * Hidden fields are skipped — ensure required data has a path to collection
  * Avoid making the first field conditional (it has no previous fields to reference)
</Warning>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Flow Forms" icon="arrow-right" href="/guides/flow-forms">
    Learn more about conversational forms
  </Card>

  <Card title="Form Fields" icon="layers" href="/guides/form-fields">
    All available field types
  </Card>
</CardGroup>
