New Inspiro AI Demo Generator — can't find the perfect demo? Describe your website and AI builds a custom one in about 2 minutes. Learn more →

Knowledge Base

Documentation

Theme Documentation



Plugin Documentation



Resources

Using Conditional Logic to Show or Hide Fields PRO

This article refers to WPZOOM Forms

Conditional logic lets a field appear only when it is relevant — for example, show a “Please specify” box only when someone picks Other, or reveal a phone-number field only when the visitor asks to be called back. Shorter forms get more submissions, and you still collect the details you need.

Conditional logic is available in WPZOOM Forms PRO.


Table of Contents

  1. How it works
  2. Setting up a rule
  3. Operators by field type
  4. Multiple rules, and hiding instead of showing
  5. What happens to hidden fields
  6. Examples
  7. Troubleshooting

How it works

Each rule lives on the field you want to show or hide (the target) and watches the value of another field in the same form (the trigger). When the visitor changes the trigger, the target appears or disappears instantly — no page reload.

A rule has three parts: which field to watch · an operator (Is, Contains, Is empty, …) · a value.


Setting up a rule

You need at least two fields: the trigger and the target. In this example the trigger is a Radio field “How did you hear about us?” with the options Search engine / Social media / A friend / Other, and the target is a Text field “Please specify”.

The trigger field
  1. Open the form in the builder (WPZOOM Forms → All Forms → click the form).
  2. Click the target field on the canvas (Please specify).
  3. In the right panel switch to the Advanced tab and turn on Enable Conditional Logic.
Conditional logic enabled
  1. A first rule appears under Show the field if. Choose the trigger field (How did you hear about us?), the operator (Is) and the value (Other). For choice fields the value is a dropdown of the field’s options; for text fields you type the value.
A complete rule
  1. Click Save. On your site the Please specify box now stays hidden until the visitor selects Other:

Before — the Please specify field is hidden:

Form before selecting Other

After selecting Other — it appears:

Form after selecting Other

To remove a rule click the × next to it; to switch the feature off click Disable.

The canvas always shows every field, so you can keep editing hidden ones. Rules are applied on the live site.


Operators by field type

Trigger field type Operators available
Text, Name, Email, Phone, Website, Number, Message, Date, Time, Hidden Is · Is not · Is empty · Is not empty · Contains · Does not contain
Select, Radio Is · Is not · Is empty · Is not empty (value chosen from the options)
Multichoice Is · Is not · Is empty · Is not empty · Contains · Does not contain (use Contains to test whether one option is ticked)
Checkbox, GDPR Is · Is not · Is empty · Is not empty — the value is Checked or Not Checked
Upload Is empty · Is not empty

Comparisons are case-insensitive.


Multiple rules, and hiding instead of showing

  • Click Add Rule to add another condition. Additional rules are labelled Or if — the field is shown when any one of the rules matches.
  • Turn on Hide when rules apply to invert the behaviour: the field is visible by default and disappears when a rule matches. The heading changes to Hide the field if.

All rules on a field share the same action (show or hide), and rules are always combined with OR. “Show only when A and B” is not supported in the current version; if you need it, combine the two questions into one choice field (e.g. a Select with the valid combinations).


What happens to hidden fields

  • A hidden field is disabled, so its value is not submitted, not stored in Submissions and not included in emails.
  • A hidden field is never required, even if Required is on — the builder reminds you of this with the note “This field won’t be required when it’s hidden.”
  • Default values of hidden fields are not sent either.
  • Layout fields (Heading, Paragraph, Divider) can also be shown/hidden — useful for an explanatory paragraph that only makes sense for one choice.

Examples

Goal Trigger Rule on the target
“Other — please specify” Radio / Select Show Please specify if Reason Is Other
Ask for a phone number only when call-back is requested Checkbox “Call me back” Show Phone if Call me back Is Checked
Show a company field for business customers Radio “I am a…” Show Company name if I am a… Is Business
Hide the newsletter opt-in for existing subscribers Select “Are you subscribed?” Hide when rules apply · if Are you subscribed? Is Yes
Show shipping address when it differs from billing Checkbox “Ship to a different address” Show each Shipping … field if the checkbox Is Checked
Show a topic-specific question for several topics Multichoice “Interests” Show Budget if Interests Contains Web design · Or if Interests Contains Branding

Troubleshooting

  • The dropdown under “Show the field if” is empty / says Add another field to the form to use as a condition. A rule needs a different field to watch — add the trigger field first.
  • The field never appears. Check the value: for text triggers the comparison is against what the visitor types (case-insensitive), so prefer Contains over Is. For Select/Radio the value must be one of the options.
  • The field shows on page load. With Show the field if … Is empty the condition is true before the visitor types anything. Use Is not empty or a specific value.
  • Required validation blocks submission although the field is hidden. Make sure the form is saved after enabling the rule and that your page cache was cleared; hidden fields are disabled and never required.
  • Logic doesn’t run in a page builder. The rules need the plugin’s frontend script. Enable Settings → General → Load assets on all pages when you embed forms via shortcode in page builders.

What’s Next?

Last updated on August 23, 2026