Conditional Logic
Show, hide, and control form fields dynamically based on user input.
What is Conditional Logic?
Conditional logic lets you create dynamic forms that respond to user input in real time. Show a field when a checkbox is ticked. Hide a section when "No" is selected. Skip to a different step based on an answer.
The result: shorter forms, better completion rates, and more relevant data. (Learn more about how form design impacts conversions.)
Setting Up Conditions
Every field in SkunkForms has a Conditions panel in the block sidebar:
- Select the field you want to control
- Open the Conditions panel in the sidebar
- Click Add Condition
- Configure:
- If — the field to watch
- Is / Is not / Contains / Is empty — the comparison
- Value — what to compare against
- Then — Show, Hide, Enable, Disable, or Require this field
Example: Show "Other" text field
You have a dropdown asking "How did you hear about us?" with options like Google, Social Media, Friend, and Other.
Condition:
- If "How did you hear about us?" is "Other"
- Then Show "Please specify" text field
The text field stays hidden until the user selects "Other" — keeping the form clean.
Date Picker Conditions
When targeting a Date field, you get date-specific operators:
- is before — date is before a specified date
- is after — date is after a specified date
- is on — date is exactly a specified date
- is in the past — date is before today
- is in the future — date is today or later
Example: Show rush fee for same-day requests
You have a service request form with a "Preferred Date" date picker.
Condition:
- If "Preferred Date" is in the past
- Then Show error message
Or for rush orders:
Condition:
- If "Preferred Date" is before [3 days from now]
- Then Show "Rush Processing Fee" field
Example: Age verification
For booking forms that require age verification:
Condition:
- If "Date of Birth" is after [date 18 years ago]
- Then Hide "Book Now" button and show "Must be 18+" message
Date conditions work with the native browser date picker and evaluate in real time as users select dates.
Multiple Conditions
You can add multiple conditions to a single field. Choose how they combine:
- All conditions (AND) — every condition must be true
- Any condition (OR) — at least one condition must be true
Example: Show discount field
- If "Role" is "Student" OR
- If "Role" is "Non-profit"
- Then Show "Discount Code" field
Multi-Step Conditional Routing
Multi-step conditional routing is a Pro feature.
In multi-step forms, conditions can control which step comes next:
- If "Budget" is "Under £1,000" → skip to Step 4 (self-service)
- If "Budget" is "Over £10,000" → go to Step 3 (book a call)
This creates branching forms that feel personalised without being overwhelming.
Tips
- Keep conditions simple — complex chains are hard to debug
- Test your forms thoroughly after adding conditions
- Use the Preview mode to walk through every path
- Name your fields clearly so conditions are easy to read