Conditional Logic
Overview
Conditional logic lets you show or hide fields, sections, or entire pages based on what the user has entered. This keeps forms short and focused, showing only the fields that are relevant to each user.
Setting Up Conditions
- Select a field in the builder.
- Open the Conditions tab in the right panel.
- Enable Conditional Logic.
- Choose Show or Hide this field…
- Add one or more condition rules.
Rule Operators
| Operator | Field types |
|---|---|
| is / is not | Select, Radio, Checkbox |
| contains / does not contain | Text, Textarea, Email |
| is empty / is not empty | All |
| greater than / less than | Number, Range, Rating |
| starts with / ends with | Text, Email, URL |
Multiple Rules
Multiple rules are combined with AND (all must be true) or OR (any must be true). Switch between AND/OR by clicking the connector between rules.
Example: Show Budget Field Only for “Enterprise” Plan
- Add a Select field “Plan” with options: Starter, Pro, Enterprise.
- Add a Number field “Monthly Budget”.
- On the Budget field, set: Show if Plan → is → Enterprise.
Conditional Logic in Multi-step Forms
Conditions also work on multi-step form pages — hide entire pages when certain criteria aren’t met. For example, skip a payment details page if the user selects “Free plan”.
PHP Filter
Evaluate or override conditions server-side:
add_filter( 'formcierge_conditional_result', function ( $show, $field_id, $conditions, $data ) {
if ( $field_id === 'vat_number' && ( $data['country'] ?? '' ) !== 'GB' ) {
return false; // Always hide VAT number outside UK
}
return $show;
}, 10, 4 );