Limited time Limited time
Start the Season With Better Forms
Up to 40%Off
Up to 40%Off
Grab Now
documentation-logo
Menu
  • Guides
  • Form Management

How conditional logic works in IvyForms

Conditional logic in IvyForms allows you to create dynamic forms that respond to user input. Instead of displaying every field at once, you can configure the form to show or hide specific fields depending on the answers users provide while filling out the form.

This helps keep forms shorter, easier to complete, and more relevant for each visitor. Users only see the fields that apply to them, which improves the overall experience and helps reduce form abandonment.

In IvyForms, conditional logic is configured directly inside the field settings using the Smart Logic tab.

What is conditional logic in IvyForms?

Conditional logic allows a form field to appear only when a specific condition is met. When the condition is not satisfied, the field remains hidden.

For example, you may ask visitors how they would like to be contacted. If they select Email, the form displays an email field. If they select Phone, the form displays a phone number field instead.

The form evaluates these rules live while the user is filling out the form, so fields instantly appear or disappear depending on the selected answers.

This approach helps keep the form simple and prevents users from seeing questions that do not apply to them.

IvyForms Smart Logic tab showing conditional logic settings for a field

Where do you configure conditional logic?

Conditional logic is configured individually for each field.

To set it up:

  • Open the form builder
  • Click the field you want to control
  • Open the Smart Logic tab
  • Enable Conditional Logic
  • Create the rule that determines when the field should appear

Once enabled, the field will remain hidden until the defined condition is satisfied.

How do conditional logic rules work?

Each conditional rule is made of three parts:

  • Field – the field whose answer will trigger the logic
  • Condition – the comparison used to evaluate the answer, such as equals, greater than, or is empty
  • Value – the value the answer is compared against (not needed for Is Empty and Is Not Empty)

For example:

  • Field: Contact method
  • Condition: equals
  • Value: phone

In this case, the field will appear only when the user selects the option whose value is phone.

Which conditions can I use in a rule?

The conditions available in a rule depend on the type of the field that triggers it. Choice fields offer Equals and Does not equal, text fields add Contains, Does not contain, Starts with and Ends with, and number-based fields let you compare values with Greater than, Greater than or equal to, Less than and Less than or equal to. Every field type also offers Is Empty and Is Not Empty, which check whether the field has been filled in at all.

The conditions above apply to field-level smart logic. Smart logic in notifications, confirmations, and integrations supports only Equals and Does not equal.

How do I compare numbers in a rule?

You can compare numbers in a rule when the trigger field is a Number, Net Promoter Score, Slider, Rating, Quantity or Total field. Pick the field, choose a comparison such as Greater than, and enter the number to compare against; decimals are supported. For example, you can show a “Delivery details” field only when Quantity is greater than 10, or show a follow-up question only when an NPS score is less than 7. The comparisons are also available for the Phone, Date, Time and Date & Time fields.

Smart logic rule using the Greater than operator on a Quantity field

If a number comparison meets an empty or non-numeric answer, the rule is treated as not met instead of causing an error.

How do I show a field only when another field is filled in?

You can show a field based on whether another field has an answer by choosing Is Not Empty as the condition. For example, a “Tell us more” field can appear only after the visitor has typed something in a previous field. Is Empty does the opposite and is true while the field is unanswered, cleared or contains only spaces. Neither condition needs a value, so the value box disappears when you select one.

Why do conditional rules use field values instead of labels?

Conditional logic compares the stored field value, not the visible label shown to users. For example, a radio field may contain these options:

  • Label: Email → Value: email
  • Label: Phone → Value: phone

Even though the user sees Email and Phone in the form, the conditional rule must reference the stored values:

  • email
  • phone

As long as the rule uses the correct value, the logic will work regardless of what the visible label says.

IvyForms option values used for conditional logic rules

What does Conditional Match mean?

When multiple rules are added, you can control how the form evaluates them using Conditional Match.

  • Any – the field appears if at least one rule is satisfied
  • All – the field appears only if every rule is satisfied

This allows you to create simple or complex conditions depending on how your form should behave.

IvyForms conditional logic with multiple rules using Any or All matching

Example of conditional logic in a contact form

A common example is showing different contact fields depending on the preferred communication method.

For example:

  • If the visitor selects Email, the form shows the Email field
  • If the visitor selects Phone, the form shows the Phone field
IvyForms conditional logic dynamically showing and hiding fields based on user selection

The form instantly updates while the user interacts with it, showing only the field that matches their choice.

Rules can also compare numbers or check whether a field has been filled in. For example, a Delivery details field can appear only when a Quantity field is greater than 10, and a Tell us more field can appear only when a previous field is not empty.