What You’ll Learn
- How conditional logic works
- Setting up conditions on fields
- Available condition operators
- Real-world examples
How Conditional Logic Works
Conditional logic lets you create rules like:
- “Show the Event Location field ONLY when Post Type equals Event”
- “Show the Price field ONLY when Listing Type equals For Sale”
- “Hide the Recipe Video field when Video Available equals No”
The form updates in real-time as members make selections.
Setting Up Conditional Logic
Step 1: Create the Trigger Field First
The field that controls visibility must exist before the dependent field. For example, create a “Post Type” select field first.
Step 2: Create the Dependent Field
Create the field that should show/hide (like “Event Location”).
Step 3: Enable Conditional Logic
In the dependent field’s settings, scroll to Conditional Logic and toggle it on.
Step 4: Configure the Condition
- Action: Choose “Show” or “Hide”
- Target Field: Select the field to compare
- Operator: Choose the comparison type
- Value: Enter the value to match
Step 5: Save the Field
Click Save Field. The logic is now active.
Condition Operators
| Operator | Meaning | Use Case |
|---|---|---|
| Equals | Exact match | Show Location when Type = Event |
| Not Equals | Doesn’t match | Show Info when Type ≠ Hidden |
| Contains | Partial text match | Show field if text contains “premium” |
| Is Empty | Field has no value | Show default when field is blank |
| Is Not Empty | Field has any value | Show related field once something entered |
Example: Event Post Type
Create a form where event-specific fields only appear when “Event” is selected.
Fields Setup
1. Post Type (Select field)
- Options: Article, Event, Review
- No conditional logic (always visible)
2. Event Date (Date field)
- Conditional: Show when “Post Type” equals “Event”
3. Event Location (Text field)
- Conditional: Show when “Post Type” equals “Event”
4. Ticket Price (Number field)
- Conditional: Show when “Post Type” equals “Event”
Result
Members creating an Article see only basic fields. When they select “Event,” the date, location, and price fields appear instantly.
Example: Product Listing
Listing Status (Select field)
- Options: For Sale, Sold, Not For Sale
Price (Number field)
- Conditional: Show when “Listing Status” equals “For Sale”
Sold Date (Date field)
- Conditional: Show when “Listing Status” equals “Sold”
Example: Review With Optional Video
Has Video (Checkbox field)
- Label: “Include video review?”
Video URL (Oembed field)
- Conditional: Show when “Has Video” is not empty (checked)
Multiple Conditions
You can add multiple conditions to a single field. All conditions must be true for the field to show (AND logic).
Example: Show “Premium Badge” field when:
- Listing Type equals “Featured” AND
- Price is not empty
Tips for Conditional Logic
- Keep it simple: Complex chains of conditions can confuse users
- Test thoroughly: Fill out the form yourself to ensure logic works
- Consider required fields: Hidden required fields can block submission – make them not required or always visible
- Document your logic: Use Help Text to explain why fields appear
Troubleshooting
| Issue | Solution |
|---|---|
| Field not showing | Check the trigger field value matches exactly |
| Field stuck hidden | Verify trigger field exists and has options |
| Can’t submit form | Hidden required field – make it not required |
Related Documentation
- Custom Field Types Guide
- Creating Custom Fields Step-by-Step
- Displaying Custom Fields on Posts
