How to Use WPForms Conditional Logic

"This Post contains affiliate links; we earn commissions if you shop through the links on this page."

WPForms Conditional Logic Featured image

WPForms is great, the best WordPress drag-and-drop contact forms builder. This tutorial will show you how to use the WPForms conditional logic features to create smart forms WordPress that adapt to users’ inputs or form field selections.

This is a useful feature for online marketers such as bloggers, affiliates, agencies, business websites, and email marketing professionals. And anyone that leverages email marketing to build and grow their online business.

When you create a contact form, especially for business websites and e-commerce stores, you might have different personas in mind or a few options for users to choose from.


The big question is, how do you create forms that allow users to make choices, select the most relevant item, hide or display the form filed, and perform multiple tasks?

Well, while it may look like a tricky thing to do, with a WordPress form builder conditional logic, there’s a simple solution to it.

What is Conditional Logic in WPForms?

The smart conditional logic WPForms addons allow you to preset the form field outputs based on users’ selected item or form filed inputs.

It is a marketing feature that lets you create smart WPForms dynamic fields to help you collect the most relevant information from users.

With WordPress conditional logic form, your users will find it more interactive, engaging, and highly relevant to their requests.

This is a helpful marketing feature that lets you create highly super-targeted web forms that convert better.

So how do you create smart, dynamic contact forms that lead users through the web form journey?

Let’s get started…

How to Create Basic Conditional Logic Rules in WPForms

First, you need to install and activate the Premium WPForms Pro Plugin on your blog.

If you don’t have the premium WPForms WordPress Plugin installed, click here to buy at 50% off the regular price today only.

Note: This offer is only available for a limited time. This means the 50% discount offer won’t be available all through the month. The faster you act, the better.

To show you how it works with WPForms conditional logic. I’m setting up a web form that uses a set of WP Forms conditions based on the user’s inputs or form filed selection.

This is a basic or simple WPForms setup guide for smart forms. In the sense that the rule is straightforward to follow.

Here is a typical scenario I want us to use for our WPForms conditional logic tutorial…

In this example, I will create new forms with conditional logic to collect the user experience on the website.

So, we’re going to set up a field that hides/shows based on the rating star of the user. I’m setting up the condition rule to “if the user experience is less than 3 stars, this field should show.

If the user experience is greater than three stars, then the field remains hidden—no need for the extra field to show.

Setting up Your Contact Forms Conditions

Now, open the contact form you want to edit to set up conditions (assuming you’ve created a contact form).

For more instructions on how to create an online contact form with WPForms, read my complete review of WPForms here.

There are pre-built contact form templates for almost any type of contact form needed in WPForms. So, you don’t have to worry about the design process.

Open the WPForms form builder panel, and click on the form field you want to show or hide. This action will auto-open the form field panel.

On the form panel field, check the box that reads “Enable Conditional Logic.”

wpforms settings page - checkbox for enabling conditional logic

Once you enable the WPForms Conditional logic box, you should see the dropdown menu option field.

And a few dropdowns option fields to set your conditions from. This field contains the:

  • Show/Hide: This option lets you set the rule to either show or hide this field when the condition is met.
  • Select Field: The field option on which this logic will depend?
  • Comparison: The comparison options you’ll like to use in the field?

The comparison field includes these options; isis notemptynot emptycontainsdoes not containstarts withends withgreater than, and less than.

Do you need to select the field’s value for the condition to apply in the select field option?

wpforms drop down menu option in the setting panel

If you choose the “empty or not empty” option in the comparison dropdown menu, this field will deactivate. So be careful when making your selection.

In our typical example of the user experience form, let’s see how all this works together.

Remember we set the condition to “if the user experience rating is less than 3 stars, then this field should show”.

So, let’s see in the gif image below how our contact form works with the condition set.

WPForms conditional logic demo

Can you see how the form field labels “How Can We Improve?” Hide/Show as the user rating increase or decreases.

This is an example of a simple or basic WPForms conditional logic setup.

How to Set up Complex WPForms Conditional Logic

The situation above is intended for a single conditional logic rule. In WPForms, it’s possible to set up complex or multiple conditions rules.

Let’s see how to define multiple conditions rules in WPForms conditional logic feature.

For our example, we want to ask users for their phone numbers using the web form we already created.

But we want to do this only if the rating is less than 3 and if the form field “How Can We Improve” is not empty.

We’re setting up 2 conditions rules for our form field Phone number. If the two rules are not met, the phone number contact form field will not show.

So first, we need to add the phone field to our form. Next, we need to click on it to reveal the setting page.

Fancy filed in wpforms setting panel

Next, we need to enable conditional logic as we did in the step above. Then we need to set the value or rules for this condition to either show/hide.

Following all the processes, we’ve set the phone form field to show if the “How Can We Improve” form field is not empty.

drop down menu panel

Now, here is a conditional logic form example. Let’s see how it works for the user on the site front-end.

WPForms complex conditional logic

As you can see from the WordPress forms with the conditional logic gif image above. Once the user starts typing words into the empty form area, the phone option field appears after selecting the star rating.

Also, immediately the content area is empty, and the Phone number field disappears.

You can also set the conditional logic field to be a required field. Once all the conditions are met, then the field becomes a required field.

This means the user must complete the steps once it begins.


Based on your business needs, there are many ways to use WPForms conditional logic to create smart, engaging forms for your business.

This tutorial is meant to give you a starting point to understanding conditional logic in WordPress form.

You can do a lot more than this tutorial can cover.

I hope this article has helped you learn more about the use of conditional logic to grow your business and build a responsive email list…

2 thoughts on “How to Use WPForms Conditional Logic”

  1. I am regular reader of your blog, but this time I am commenting here because I want to create feedback form including payment, will this work for same? If yes, which plugin should I download?

    1. Hi, Kishanu,

      Yes, you can create feedback forms and Payment forms with WPForms. Though you need to buy the premium WPForms plugin to have these features enabled. With the free version of WPForms, there is a limit to what you can do.

      I hope this answers your question.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.