Using Conditional Logic in Forms

Create smart, dynamic forms that show or hide fields based on user responses. Conditional logic streamlines forms by displaying only relevant questions to each user.

Prerequisites

  • Account: Logged into FormRobin
  • Form: Created a form with at least 2 fields
  • Plan: Available on ALL plans (Free and Individual)

What is Conditional Logic?

Conditional logic lets you control which fields appear based on how users answer previous questions. For example:

  • Show "Company Name" field only if user selects "Business" account type
  • Display shipping address only if user chooses physical product
  • Ask follow-up questions based on satisfaction rating
  • Hide irrelevant fields to reduce form length and improve completion rates

How Conditional Logic Works

Conditional logic uses IF-THEN rules:

IF [Field A] [Operator] [Value]

THEN [Show/Hide] [Field B]

Example:

IF "Account Type" equals "Business"

THEN show "Company Name" field

Setting Up Conditional Logic

  1. Open your form in the form editor
  2. Select the field you want to show or hide conditionally
  3. Click Add Condition or Conditional Logic option
  4. Configure the condition:
    • Choose the trigger field (the field that controls visibility)
    • Select an operator (equals, contains, is empty, etc.)
    • Enter the comparison value (what to check for)
    • Choose the action (show or hide this field)
  5. Click Save to apply the condition
  6. Test your form to verify the logic works correctly

Available Operators

FormRobin supports 12 conditional operators:

Equality Operators

  • Equals - Field value matches exactly
  • Not Equals - Field value does not match

Content Operators

  • Contains - Field value includes the text
  • Not Contains - Field value does not include the text
  • Starts With - Field value begins with the text
  • Not Starts With - Field value does not begin with the text
  • Ends With - Field value ends with the text
  • Not Ends With - Field value does not end with the text

State Operators

  • Is Empty - Field has no value (blank)
  • Is Not Empty - Field has any value

Numeric Operators

  • Greater Than - Numeric value is larger than comparison
  • Less Than - Numeric value is smaller than comparison

Multiple Conditions (AND/OR Logic)

Combine multiple conditions for complex logic:

AND Logic: All conditions must be true

Example: Show "Student Discount" field if:

- Age is less than 26 AND

- Account Type equals "Student"

OR Logic: At least one condition must be true

Example: Show "Discount Code" field if:

- Account Type equals "Student" OR

- Membership equals "Premium"

Available Actions

  • Show - Display the field when condition is met
  • Hide - Hide the field when condition is met

Common Use Cases

Account Type Branching

Show different fields for personal vs business accounts:

  • IF Account Type equals "Business" THEN show Company Name, Tax ID, Business Address
  • IF Account Type equals "Personal" THEN show Date of Birth, Personal Address

Feedback Follow-ups

Ask detailed questions based on ratings:

  • IF Satisfaction rating is less than 3 THEN show "What can we improve?"
  • IF Satisfaction rating equals 5 THEN show "Would you recommend us?"

Product Variations

Collect relevant details based on product type:

  • IF Product Type equals "Physical" THEN show Shipping Address
  • IF Product Type equals "Digital" THEN show Email for Delivery

Best Practices

  • Test thoroughly - Preview and test all conditional paths
  • Keep it simple - Too many conditions can confuse users
  • Provide context - Use field descriptions to explain why questions appear
  • Consider mobile - Test conditional logic on mobile devices
  • Use logical flow - Conditions should feel natural, not arbitrary

Limitations

  • Field Dependencies: Trigger field must appear before the conditional field in form order
  • Comparison Value: Maximum 255 characters
  • Circular Logic: Avoid creating circular dependencies (Field A depends on Field B, which depends on Field A)
  • Real-time Updates: Conditions evaluate as users fill the form, not after submission

Troubleshooting

Issue: Conditional field not showing/hiding

Fix: Check that the trigger field appears before the conditional field in your form order. Reorder fields if needed by dragging and dropping.

Issue: Condition works incorrectly with multiple choice

Fix: Ensure the comparison value exactly matches the option text (case-sensitive). Check for extra spaces or typos.

Issue: Multiple conditions not working as expected

Fix: Verify you are using the correct logic gate (AND vs OR). AND requires all conditions to be true; OR requires at least one.

Issue: Numeric comparisons (greater than/less than) not working

Fix: Ensure the field type is set to Number. Text fields cannot use numeric operators.

FAQ

Q: Is conditional logic available on the Free plan?

A: Yes! Conditional logic is available on all plans including Free.

Q: Can I add multiple conditions to one field?

A: Yes, you can combine multiple conditions using AND/OR logic.

Q: Can conditional logic affect required fields?

A: Yes. If a required field is hidden by conditional logic, it is not required for submission.

Q: Do conditions work on mobile devices?

A: Yes, conditional logic works identically on desktop and mobile devices.


Need more help? Contact support at support@formrobin.com - we're here to help!

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.