
Using Multiple Conditions: AND vs OR Logic in Forms
A single condition is easy to grasp: show this field when that answer is chosen. But real forms often need more nuance — show a field only when several things are true, or when any one of a few things is. That’s where AND and OR come in. Getting them right is the difference between logic that fires exactly when you want and logic that misbehaves. Here’s how to use multiple conditions in Auto Form Builder’s conditional logic.
The building block: a single condition
Every rule starts with one condition — a field, a comparison, and a value, like “Enquiry type is Support.” On its own, that shows or hides a field based on one answer. Multiple conditions simply combine several of these, and how you combine them is what AND and OR control.
AND: every condition must be true
Use AND when a field should appear only if all your conditions are met. AND narrows things down. For example: show a “Team plan details” field only when the plan is “Business” AND the team size is “more than 10.” Both have to be true; if either isn’t, the field stays hidden. Reach for AND when you’re targeting a specific combination of answers.
OR: any condition can be true
Use OR when a field should appear if any one of your conditions is met. OR broadens things out. For example: show a “How can we help?” field when the enquiry is “Support” OR “Complaint” OR “Feedback.” Any of those triggers it. Reach for OR when several different answers should all lead to the same result.
AND narrows, OR broadens
That’s the mental model to keep: AND makes a rule pickier (more conditions to satisfy), OR makes it more inclusive (more ways to satisfy it). If your field is showing too often, you probably want AND to tighten it. If it’s not showing when it should, OR may be what you need to catch more cases.
A practical example
Imagine an event form. You want to show a “Dietary requirements” field only to people who are actually attending the dinner. If attendance is captured in one field and dinner choice in another, you’d use AND: show the field when “Attending is Yes” AND “Dinner is Yes.” Now change the goal — you want to show a “Contact me” field to anyone who picked any premium ticket. That’s OR: show it when the ticket is “Gold” OR “Platinum” OR “VIP.” Same feature, different combiner, very different behavior.
Tips for reliable logic
- Decide first whether you’re describing “all of these” (AND) or “any of these” (OR) before adding conditions.
- Keep rules as simple as they can be — fewer conditions are easier to reason about and maintain.
- Test the form in preview, trying the answer combinations that should and shouldn’t trigger each field.
- For skipping whole sections rather than single fields, combine this with multi-step branching.
Precise forms, exactly when you want them
AND and OR turn conditional logic from a simple show/hide into a precise tool. Once you’re comfortable combining conditions, you can build forms that respond to almost any combination of answers — showing the right field to exactly the right person, every time. It’s all built in, and free.
Ready to build smarter logic? Install Auto Form Builder free from WordPress.org.
FAQ
What's the difference between AND and OR in form logic?
AND requires every condition to be true for the rule to fire. OR requires just one of them. AND narrows; OR broadens.
Can I use several conditions on one field?
Yes. You can add multiple conditions per field and combine them with AND/OR, so a field appears based on a precise combination of answers.