Disclosure: CyberNaira content is reader-supported. We may receive financial compensation if you purchase products or services on the merchant website but at no additional cost.

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 WordPress forms that adapt to users’ inputs or form field selections.

This feature is useful 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 field, and perform multiple tasks?

While it may look tricky 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’s conditional logic form, users will find it more interactive, engaging, and relevant to their requests.

This helpful marketing feature 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…

Creating Basic Conditional Logic Rules in WPForms

First, 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 WPForms at an affordable price today.

To show you how it works with WPForms conditional logic. I’m setting up a web form that uses 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, so the rule is straightforward.

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: “If the user experience is less than 3 stars, this field should show.

If the user experience exceeds 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 creating 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

You should see the dropdown menu option field once you enable the WPForms Conditional logic box.

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

This field will deactivate if you choose the “empty or not empty” option in the comparison dropdown menu. 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.

Setting 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 example, we want to ask users for their phone numbers using the web form we 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. The phone number contact form field will not show if the two rules are not met.

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’s 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, the content area is immediately 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, the field becomes required.

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 for 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…

Similar Posts


  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 Reply

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.