In many real-life form scenarios, a single condition is not enough. You may want a field to appear only when multiple conditions are true, or if any one of several conditions is true. This is where AND / OR logic comes in.
With the Conditional Fields for Elementor Form plugin, you can combine multiple rules using AND or OR logic to control how and when a field is shown, hidden, enabled, or disabled.
Apply Multiple Conditions Using “AND” Logic
Use AND logic when all specified conditions must be true for the action (show/hide) to take place.
Example Use Case
Let’s say you want to show a field titled “Upload Company Documents” only when:
- The user selects “Business” in the
account_type
field
AND - They enter more than 5 employees in the
team_size
field
The logic would be:
Show “Upload Company Documents” ifaccount_type
equals “Business”
ANDteam_size
is greater than 5
Apply Multiple Conditions Using “OR” Logic
Use OR logic when any one of the conditions is enough for the field to be triggered.
Example Use Case
You want to show a field called “Apply Student Discount” if:
- The user selects “Student” in the
user_role
field
OR - Their email address ends with “@college.edu”
The logic would be:
Show “Apply Student Discount” ifuser_role
equals “Student”
OR
Common FAQs
Q1: Can I combine AND and OR logic together?
Answer: Not in a single rule group. Each field allows one logic type per condition group. If you need complex combinations, split the logic using different conditions or restructure your form.
Q2: What happens if one of the condition fields is hidden or not filled?
Answer: If you’re using AND logic, the entire condition will fail unless all inputs are filled and valid. With OR logic, even one valid condition will pass and trigger the action.
Q3: Can I create conditions based on checkbox or radio field values?
Answer: Yes, you can use Equals, Contains, and other compare operators to match checkbox or radio values. Just make sure the correct value label or option is used.
Q4: My condition is not working. What should I check?
- Ensure that Field IDs are correct and match the field triggering the condition.
- Double-check that you’re using the right compare operator.
- Make sure the conditional field is not hidden due to another rule.
- Inspect your console for JavaScript errors or plugin conflicts.