rapidform / Documentation

Conditional Logic

Conditional logic lets you show or hide form fields based on the value of another field. This keeps your forms concise by only displaying relevant fields to each respondent.

Available on Pro and Business plans.

How It Works

  1. Open the form builder and select a field you want to conditionally show or hide.
  2. In the field settings panel, enable Conditional Logic.
  3. Configure the condition:
    • Source Field — The field whose value determines visibility.
    • Operator — How to compare the source field's value.
    • Value — The value to compare against (not needed for is_empty / is_not_empty).

The target field is only visible when the condition is met. When the condition is not met, the field is hidden.

Operators

Operator Description Example
equals Source value matches the specified value exactly Show "Company Name" when Role equals "Business"
not_equals Source value does not match the specified value Show "Other Details" when Category is not "General"
contains Source value contains the specified text Show "Allergies" when Diet contains "Special"
is_not_empty Source field has any value Show "Follow-up Email" when Email is not empty
is_empty Source field is empty Show "Contact Phone" when Email is empty

Client-Side Evaluation

Conditional logic runs entirely in the browser for instant response. As soon as a user changes a field value, dependent fields appear or disappear without any page reload or server round-trip.

Validation Behavior

When a field is hidden by conditional logic:

  • Validation is skipped — Required rules and other validations are not applied to hidden fields.
  • Data is excluded — Hidden fields are not included in the submission data.

This ensures respondents are never blocked by validation errors on fields they cannot see.

Examples

Show a text field when a specific dropdown option is selected

  • Source field: "How did you hear about us?" (dropdown)
  • Operator: equals
  • Value: "Other"
  • Target field: "Please specify" (text)

The "Please specify" field only appears when the user selects "Other" from the dropdown.

Show additional fields when a checkbox is checked

  • Source field: "Subscribe to newsletter" (checkbox)
  • Operator: is_not_empty
  • Target field: "Preferred frequency" (radio)

The frequency preference field only appears when the user opts into the newsletter.

Hide a field when another field has a specific value

  • Source field: "Country" (dropdown)
  • Operator: equals
  • Value: "United States"
  • Target field: "State/Province" (text)

The "State/Province" field appears only for US respondents.

Server-Side Verification

While conditional logic runs client-side for responsiveness, the server also evaluates conditions when processing submissions. This prevents hidden field data from being stored and ensures validation consistency regardless of client behavior.

← Previous Themes and Styling Next → Validation Rules