Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

6 Ways to Use Conditional Logic in WordPress Forms (Top Use Cases)

Have you ever created a detailed WordPress form, only to see your completion rates drop? Visitors glance at the long list of questions and leave your site without finishing. It’s frustrating, especially when you need that information.

That’s where conditional logic comes in. 💡

It helps you show only relevant questions based on earlier answers, which keeps users engaged and improves the quality of your data.

We’ve seen firsthand how this one feature can drastically boost form performance. And in this guide, we’ll share 6 of the most effective ways to use conditional logic in WordPress forms. This way, you can create smarter, more personalized forms people actually want to complete.

Ways to use conditional logic in-post image

📌 TL;DR: Conditional logic dynamically shows or hides fields based on user input, and in this guide, we cover survey follow-ups, RSVP options, job applications, personalized thank-yous, smart notifications, and chained quizzes using WPForms and Formidable Forms.

What Is Conditional Logic in Forms, and Why Is It Important?

Conditional logic is a powerful form-building feature that allows fields to appear or disappear based on the user’s responses. Rather than overwhelming every visitor with the same set of questions, you can tailor the form to show only what’s relevant.

This creates a cleaner, more personalized experience, making your WordPress forms easier to complete.

For example, let’s say you have a customer satisfaction survey form on your website.

In this type of form, you don’t want to show every possible follow-up question to every user. Instead, you can show follow-up questions based on how they responded in the star rating.

Previewing an NPS survey form

Here’s how conditional logic might work in practice:

If a user gives a low rating (1–2 stars), you could display follow-up fields like “Please describe your issue” or “How can we improve?” But if they give a high rating (4–5 stars), you might instead ask, “What did you like the most?”

When users only see questions that matter to them, they’re more likely to stay engaged and finish the form, which is crucial since studies show over 77% of online shoppers abandon forms. That means you get more submissions and better-quality data to work with.

And with cleaner input, you can send smarter follow-ups, personalized recommendations, or targeted emails. All based on how someone interacts with your forms.

How to Add Conditional Logic in WordPress Forms

In the following sections, we will share 6 conditional logic use cases to improve your WordPress forms. To demonstrate the process, we will use WPForms and Formidable Forms.

WPForms is the best, most beginner-friendly form builder with AI tools and drag-and-drop functionality. It has more than 2,100 templates, which can help you create any form in just a few minutes.

Plus, we use WPForms ourselves on the WPBeginner website. We rely on this tool for our contact form, annual user survey, site migration form, and more. For more information on our experience with it, see our extensive WPForms review.

WPForms' homepage

Meanwhile, the Formidable Forms plugin is a more advanced option. It’s best for creating complex forms, including calculators and quizzes. You can read our Formidable Forms review for more details.

So, before we start, you might want to install these plugins first. For more details, feel free to check out our detailed guide on how to install a WordPress plugin.

📝 Note: To use conditional logic on WPForms and Formidable Forms, you’ll need the premium versions of the plugins. But you can always build the base form with WPForms Lite and then upgrade to a paid plan to apply the conditional logic rules.

Here’s a quick overview of the use cases we will cover in this article:

Ready? Let’s get started.

Use Case 1: Ask for Additional Information in Survey Forms

Conditional logic makes your survey feel like a real conversation.

For example, if a user or customer says your shop wasn’t great, the form can automatically ask a follow-up like, “What went wrong?” This helps you get more useful feedback instead of asking everyone the same questions.

In this first use case, we’ll show you how to create a survey form that feels like a conversation using WPForms AI.

You can start with the free WPForms version to build a basic form. But do note that while conditional logic and the AI builder are available on the Basic plan, this survey requires the Pro plan because the Likert Scale and NPS fields come from the Surveys & Polls addon.

Step 1: Create a Survey Form Using WPForms

To start creating a survey form, you first need to navigate to WPForms » Add New from your WordPress dashboard.

The Add New button under WPForms in the WordPress admin area

This will redirect you to the WPForms Setup page, where you can name your form and select how you’ll build your form.

Now, you’ll see several template options on the form builder screen. Instead of picking one, click the ‘Generate With AI’ button to open the AI assistant.

Generating a Form With AI Using WPForms

Here’s where you can describe exactly what you want.

Be specific—this helps the AI create a better result. For example, you can ask it to include interactive fields like a Likert Scale or a Net Promoter Score (NPS) field to make your survey more professional.

For this example, you can enter a prompt like:

Create a conversational customer survey for a coffee shop. Include a Likert Scale for atmosphere, a Net Promoter Score field, and a Paragraph Text field asking 'Please explain your low rating'.
Generating a Form With AI in WPForms

Once you submit your prompt, WPForms AI will generate a draft of your form. It will choose the right field types automatically and set up things like a 0–10 rating scale for loyalty questions.

After that, you’ll see a preview of your survey.

If you want to tweak anything, you can continue using the chat to update it. For example, you might ask it to “add a newsletter optin checkbox” or “translate this entire form into Spanish.”

📝 Note: AI edits only work while you’re on this preview screen. If you leave, the chat session will reset.

A Form Generated by AI in WPForms

When you’re happy with the result, click the ‘Use This Form’ button. This will open the standard WPForms drag-and-drop builder.

Step 2: Apply Conditional Logic in Your Form

Once your form fields are ready, it’s time to apply the conditional logic. For example, you can use it to show or hide questions if a user submits a 1 or 2-star rating.

To set this up, you’ll want to click on the ‘Please explain your low rating’ field. Next, open the ‘Smart Logic’ tab on the left and turn on the ‘Enable Conditional Logic’ option.

Enabling Conditional Logic for a WPForms Survey Field

Now you can create a rule for when this field should appear. For example, you might show this question only if a rating, like “Coffee Quality,” is less than 3 stars.

This small adjustment makes your survey feel more relevant to each visitor and avoids showing unnecessary questions.

🧑‍💻 Pro Tip: You can also ask the AI to set this up for you when generating the form. For example, include something like “only show the feedback box if the rating is 2 stars or less” in your prompt.

You can repeat this process for other fields as well. This helps you build a cleaner, more focused survey that collects only the most useful feedback.

If everything else looks good already, you can click ‘Save’ so you don’t lose your progress.

Conditional logic on an AI-powered quiz

For step-by-step instructions, you can see our guide on how to build interactive WordPress surveys with AI.

Use Case 2: Show or Hide Options in Event RSVP Forms

In an RSVP form, you can use conditional logic to direct users through different paths based on their answers.

For instance, if a user answers ‘Yes’ to attending your event, you can ask whether they want to bring extra people with them. If they answer ‘No,’ then they can skip those questions and move on to the next relevant section.

This keeps the survey short and sweet for each respondent, which can help improve your form completion rates.

Step 1: Create an RSVP Form Using WPForms

In WPForms, you can quickly set up an RSVP form using the ‘Party Invitation RSVP Form’ template. From your WordPress dashboard, let’s navigate to WPForms » Add New.

On the Setup page, you can name your form based on the event you want to hold. Here, we will go with the ‘Party RSVP Form’ as an example.

Then, you can scroll down the screen to locate the ‘Party Invitation RSVP Form’ template. Once you’ve found it, simply hover over the template and click ‘Use Template.’

WPForms' Party Invitation RSVP template

On the next screen, you’ll see the drag-and-drop form builder.

The left side contains all the customization settings, and the right side shows the form’s live preview.

WPForms' form builder for editing Party RSVP Form
Step 2: Customize the RSVP Form with Conditional Logic

To start customizing, you can simply click on a field, for example, ‘Checkboxes.’

WPForms will then display the customization panel on the left-hand side. Here, you can edit the label, add a new choice, and write a description for the ‘Will you be attending?’ field.

The Will you be attending? field

🧑‍💻 Pro Tip: If you ever hit a wall when adding options, try AI Choices. Just describe what you need, like “common reasons people contact a business” for a contact form, and the AI will generate a relevant list for you automatically.

Now, it’s time to set up conditional logic.

Basically, you’ll want to show the ‘How many additional guests are you bringing?’ field only if a user selects ‘Yes’ on ‘Will you be attending?’.

To show or hide the field, the first thing you need to do is click the ‘How many additional guests are you bringing?’ field.

On the left-hand side, you can head over to the ‘Smart Logic’ tab. Then, simply toggle on the ‘Enable Conditional Logic’ option.

Enable conditional logic for How many guests are you bringing?

Then, you’ll see dropdown menus for configuring the settings:

  • Show or Hide. This dropdown allows you to show or hide the ‘How many additional guests are you bringing?’ field.
  • Select Field. In this dropdown, you’ll choose one from the other fields in the form to set the subject of the condition.
  • Is and other options. The default configuration for this dropdown is ‘is.’ But you can find different options like ‘is not,’ ’empty,’ ‘contains,’ ‘starts with,’ and more.
  • Select Choice. In this last one, you’ll choose an option from your chosen field.

Now, the complete configuration should be ‘Show‘ this field if ‘Will you be attending‘ ‘is‘ ‘Yes‘.

Once you are done, remember to click ‘Save’ to save your progress.

And that’s it! You’ve successfully used conditional logic to show or hide a field. Here’s what the form might look like on your WordPress website:

The Party RSVP Form on the live website

For the full guide, you can hop over to how to create an RSVP form in WordPress.

Use Case 3: Display Different Fields in Job Application Forms

If you are accepting job applications, then you can use conditional logic to display different fields based on the position the applicant is applying for.

For example, if an applicant selects the ‘Software Developer’ position, you can display an additional field such as ‘Programming Languages Knowledge.’

And if they choose ‘Graphic Designer,’ then the ‘Design Software Skills’ field will appear instead.

Step 1: Create a Job Application Form Using WPForms

Let’s head over to WPForms » Add New from your WordPress dashboard, and start creating a job application form with conditional logic.

Once inside the ‘Setup’ page, the first thing to do is name your form. After that, you’ll want to scroll down to select a template.

WPForms has a lot of job application form templates.

In this example, we are going to use the ‘Job Application Upload Form.’ Once you’ve located the template, you’ll want to hover over it and click ‘Use Template.’

WPForms' Job Application Upload Form template

Once you arrive at the WPForms’ builder interface, you can start customizing the template using the tools in the left-hand panel.

In the right-hand panel, you have the live preview. You can explore this section to see what fields are available on the template.

WPForms' builder interface for the Job Application Upload Form template
Step 2: Customize Your Job Application Form for Available Positions

For a job application form, you might need to add a dropdown field for multiple positions and checkbox fields for required skills. Then, you can set conditional logic based on the candidate’s selection in the available position dropdown.

To create a ‘What position are you applying for?’ field, simply click ‘Dropdown’ on the left-hand side.

After that, you can drag and drop the new dropdown field above the ‘How did you find out about this position?’ field to keep everything organized.

A new dropdown field for the job application form

Next, let’s click on the dropdown field to edit its details. This will open the ‘Field Options’ tab. There, you can edit the following:

  • Label. This is like a name. Instead of ‘Dropdown,’ you can change it to ‘What position are you applying for?’
  • Choices. In this field, simply type in the available positions. For example, we are going to use ‘Software Developer‘ and ‘Graphic Designer’. You can enter as many as you want.
  • Description. If necessary, you can give a brief description of the field. Then, it will show just below the dropdown menu.
  • ‘Required’ switch. You’ll want to toggle on the ‘Required’ switch to make sure candidates don’t skip this step.

Once you’ve completed the details, here’s what it might look like:

Customized dropdown field

The next step is to prepare checkbox fields to follow up on the candidate’s input for the position they are applying for.

Let’s go back to the ‘Fields’ tab and click ‘Checkboxes’. Then, you’ll want to do it once again so you have two checkbox fields.

Once you have added the fields, you can drag and drop them below ‘What position are you applying for?’

Adding checkboxes

Now, you can click on the checkbox fields to edit their details. In the ‘Field Options’ panel, you can edit the following:

  • Label. You can change it to ‘Programming Languages Knowledge.’ For the second checkbox, you can label it as ‘Design Software Skills.’
  • Choices. The choices for the software developer position could be C++, Python, JavaScript, GO, Ruby, and so on. The graphic designer’s required skills can include Figma, Photoshop, Adobe Illustrator, Procreate, GIMP, etc.
  • Description. For this field, it’s a good idea to let candidates know they can choose multiple options.
  • Toggles. The checkboxes’ Field Options panel has several switches. The ‘Use image choices’ toggle lets you add images to each available option. And the ‘Use icon choices’ field lets you use icons for each available option. Then, the ‘Required’ toggle makes sure that candidates fill out the field.

🧑‍💻 Pro Tip: Not sure what to add to your checkboxes? Just use the WPForms AI Choices feature. Write what you’re looking for, like “Key skills for a software developer” or “Popular design tools for a graphic designer”, and let AI list the options for you.

While images and icons are great for visual appeal, we are going to stick with standard text choices for this tutorial. After customizing the fields’ details, here’s the final look:

Customized checkboxes fields
Step 3: Apply Conditional Logic for Different Positions

Now, you should be ready to set the conditional logic.

To start with, you’ll want to click on the ‘Programming Languages Knowledge’ field. Then, simply navigate to the ‘Smart Logic’ tab to enable conditional logic.

Now, simply switch the ‘Enable Conditional Logic’ toggle on. After that, you can set the field to show only when candidates choose the ‘Software Developer’ position.

Here’s how the full configuration should be: ‘Show‘ this field if ‘What position are you applying for?’ ‘is‘ ‘Software Developer‘.

Conditional logic for candidates applying for the software developer position

Next, let’s repeat the steps once again for candidates applying for the graphic designer position.

You’ll first want to click on the ‘Design Software Skills’ field. Then, go ahead and enable conditional logic from the ‘Smart Logic’ tab.

Once you do that, you can configure the settings.

The full configuration for this field should be: ‘Show‘ this field if ‘What position are you applying for?‘ ‘is‘ ‘Graphic Designer‘.

Design Software Skills conditional logic configured

At this point, you can go ahead and click ‘Save.’

📝 Note: Don’t worry about marking conditionally hidden fields as ‘Required.’ WPForms is smart enough to ignore the required rule if the field remains hidden from the user. At this point, you can go ahead and click ‘Save.’

Congratulations – You’ve successfully created a job application form with conditional logic. Here’s what it might look like on your website:

Job Application Form with conditional logic on a live website

For details, please see our guide on how to create a job application form in WordPress.

Use Case 4: Personalized Thank-You Messages

Conditional logic also lets you send different thank-you messages based on the user’s selection within your WordPress form. Personalized thank-you messages can provide valuable and specific information to the user, which can improve engagement.

For instance, if a user selects ‘Technical Support Inquiry’ within a support form, then the thank-you message can include information on the next steps and a link to support resources.

If they select ‘Sales Inquiry,’ then the message can include information on your products and a link to schedule a consultation or demo.

Step 1: Create a Support Form Using WPForms

In WPForms, you can set up different thank-you messages in the notifications settings area.

But first, let’s create a support form. You can do this by navigating to WPForms » Add New.

The Add New button under WPForms in the WordPress admin area

On the next screen, you will name your form. This name is for your reference only, so you can use any name you want.

Then, go ahead and scroll down the screen to select a template. You can use the search bar to find the support form template more quickly.

Once you’ve found a survey form template you want to use, simply hover over it and click ‘Use Template.’ In our example, we are using the ‘Technical Support Form’ template.

Support form template

This will redirect you to the WPForms builder interface.

Step 2: Configure Confirmation Settings with Conditional Logic

From here, you’ll want to head over to Settings » Confirmations. Then, you can click on ‘Add New Confirmation’.

WPForms' Add New Confirmation button

Once you click on the button, you’ll see a pop-up window.

In this pop-up, type your new confirmation name into the text box. Here, we’re naming it ‘Technical Support Inquiry Confirmation.’

Then, go ahead and click ‘OK’ to get to the settings area.

Naming the technical support inquiry confirmation

In the ‘Confirmation Type’ field, you’ll want to choose ‘Message.’

This will open the text box, where you can write a custom confirmation message when users submit a technical support inquiry. Here’s an example:

The custom confirmation message for technical support inquiries

Once done, it’s time to set up conditional logic.

Firstly, you can scroll down the section to find the ‘Enable Conditional Logic’ toggle. You need to switch it on.

Enabling conditional logic for technical support inquiry confirmation message

Then, you’ll be able to configure the settings through the dropdown menus:

  • Use or Don’t Use. This field lets you specify when to use the confirmation message. We will set this up as ‘Use.’
  • Select Field. In the next dropdown menu, go ahead and choose ‘What can we help you with today?’ to use as the subject.
  • Is and other options. Here, you’ll see that the default setting is ‘is.’ You’ll want to keep it like this.
  • Select Choice. Finally, let’s select the ‘Technical Support Inquiry’ option, as we want to use this confirmation message when a user is asking for technical help.

After finishing up the configuration, here’s what it might look like:

Conditional logic for the technical support inquiry's confirmation message

Once all is done, simply click ‘Save’ to keep your progress. Then, you’ll want to repeat these steps to set up a confirmation message for users submitting sales inquiries instead.

That’s it – you’ve now learned to use conditional logic to personalize thank-you messages.

Use Case 5: Set Up Multiple Notification Recipients

This use case works best if you have a form on your landing page or a popup designed to capture leads.

By setting up your multiple recipients, you ensure that every lead is directed to the right team right away.

Customers and prospects will appreciate the reduced response time. This will help you make your customer service lead capture process more efficient and effective.

Using the same support form as in the previous method, let’s try creating a notification for your technical support and sales team.

Step 1: Edit Your Support Form to Add a Notification

First, you’ll need to navigate to WPForms » All Forms and click on ‘Edit’ under your technical support form.

The Edit button for a support form example

Then, you can start setting up notifications by navigating to Settings » Notifications.

From here, go ahead and click on ‘Add New Notification’.

The Add New Notifications on WPForms' notifications settings area

A pop-up window will appear. All you need to do is name the new notification. Here, we will name it ‘New Technical Support Inquiry.’

Then, simply click ‘OK’ to move on to the next step.

The pop-up window for naming a new notification

Once inside, the first thing you want to do is type the correct email address for your technical support team into the ‘Send To Email Address’ field.

You can delete or keep the {admin_email} smart tag. If you keep it, be sure to separate the emails with a comma (for example: {admin_email}, support@yourdomain.com).

Adding the technical support email address to the Send to Email Address field
Step 2: Apply Conditional Logic to the New Notification

Next, you can scroll down the section to find the ‘Enable Conditional Logic’ toggle.

Go ahead and switch on that toggle.

The enable conditional logic toggle on WPForms' notifications setting area

Below the toggle, you should find dropdown menus for setting up conditional logic:

  • Send or Don’t Send. This dropdown lets you choose to send or not send notifications. Let’s choose ‘Send.’
  • Select Field. In this field, you’ll want to choose ‘What can we help you with today?’. This will set the subject for the following dropdown menus.
  • Is and other options. The default setting is ‘is,’ and we will keep that.
  • Select Options. In this last field, you’ll want to select the ‘Technical Support Inquiry’ option.

Here’s how the conditional logic should look after configuration:

Setting up conditional logic for technical support notifications

Once that is done, don’t forget to click ‘Save’ so you don’t lose your progress.

Then, you’ll want to repeat these steps, from adding a new notification to clicking ‘Save’ to create notifications for the sales team.

And that’s it! You’ve learned to use conditional logic to set appropriate notification recipients.

Use Case 6: Create a Chained Quiz

One of the most fun ways to use conditional logic is to create quizzes in WordPress with chained answers and responses.

A chained quiz lets you present questions to users based on their previous answers. So, because each user’s path through the quiz can be different, this will be a more personalized and interactive experience.

For example, a health and wellness website could use a chained quiz to recommend personalized fitness plans.

You can start by asking about the user’s main fitness goal—like weight loss, muscle gain, or overall health. Based on their answer, follow up with more relevant questions, such as their exercise habits or diet.

We will be using Formidable Forms for this final use case. It is one of the best WordPress conditional logic plugins for creating quizzes. Plus, it also allows you to create a scoring system along with the quiz.

📝 Note: Looking to build personality-style quizzes? We recommend WPForms. It’s beginner-friendly and great for fun, engaging content like “What’s Your Travel Style?” or “What Type of Cheese Are You?” quizzes.

For details, see our guide on how to create a personality quiz in WordPress.

Pre-Requisite: Build a Personalized Fitness Plan Page for Form Submission

Before we start, do note that users will expect to get a personalized fitness plan after they submit the form. Redirecting users to a dedicated page allows you to format the fitness plan beautifully with images or videos.

Plus, it makes it much easier to track your form in Google Analytics.

To do this, let’s create the fitness plan pages. You can go to Pages » Add New Page from your WordPress dashboard.

Clicking Add New Page in WordPress admin area

In the content editor, you can start creating the personalized fitness plan for all the possible combinations for your conditional logic form. For this tutorial, we’ll show you how to redirect users who choose:

  • ‘Weight loss’ for the ‘What is your primary fitness goal?’ question.
  • ‘3-4 times a week’ for the ‘How many days a week will you exercise?’ question.
  • ‘Gym’ for the ‘Do you prefer home or gym exercise?’ question.

Here’s what our draft looks like:

Drafting a fitness plan

Once you’re done, you can hit the ‘Publish’ button and, once again, on the confirmation panel.

Then, you can click the ‘View Page’ link when publishing is done.

Publishing a fitness plan page

Go ahead and copy the page’s URL (or keep this tab open for easy access), we’ll need this for a redirect.

Step 1: Install and Activate the Quiz Plugin

To use the quiz features, you will first need to purchase a premium license from the Formidable Forms website.

Then, you can install the free Formidable Forms plugin on your WordPress website. For detailed instructions, see our step-by-step guide on how to install a WordPress plugin.

With that done, go to Formidable Forms » Global Settings and click the ‘Connect an Account’ button to verify your license.

Connect an account button on Formidable Forms' general settings

This will redirect you to a new page.

On this page, you can see the email address that you used to sign up for Formidable Forms. If everything is in order, go ahead and click ‘Connect and Install Formidable Forms Pro.’

Connecting a Formidable Forms pro account

The button will change to ‘Please wait…’. Simply give it a moment for the connection process to complete.

Step 2: Create a Quiz Using Formidable Forms

Once done, let’s navigate to Formidable Forms » Forms » + Add New.

Formidable Forms' add new button

The next step is choosing a template.

In the ‘Form Templates’ panel, we can see that Formidable Forms offers more than 300 templates. To find a quiz template more quickly, you can type ‘quiz’ into the search bar.

Then, simply hover over the ‘Quiz’ template and click ‘Use Template.’ You can also preview the template first by clicking the ‘View Demo’ button.

Formidable Forms' use template button

Clicking the ‘Use Template’ button will redirect you to the Formidable Forms builder.

You can access all the customization tools on the left-hand side. The right-hand side is where you have the form’s live preview.

Formidable Forms form builder interface

We can see that there are pre-set questions in this form template.

To add your questions, you can click on each field. Then, simply adjust the written copy from the customization panel on the left-hand side.

For this guide, we are going to create a health and wellness chain quiz as an example.

Here, we are changing the first question from ‘Which one of these is not like the others?’ to ‘What is your primary fitness goal?’

Then, let’s tick the ‘Required’ checkbox to make sure users don’t skip this question.

Formidable Form field label edited and required checkbox ticked

If you want, then you can change the radio button style. We are sticking with ‘Simple’, but you can use images or install the ‘Button’ add-on to get more access to other button styles.

Now, you’ll want to scroll down the customization panel and change the options for this question.

We are adjusting the options to ‘Weight loss,’ ‘Muscle gain,’ and ‘General health.’ By default, the form template has four options. So, we will want to make sure that we change that, too.

To remove an option, simply click the ‘-‘ button to the right of the option field.

The button to remove an option field in Formidable Forms builder

Once you click the ‘-‘ button, you’ll see in the live preview that Formidable Forms has removed the option.

Next, you’ll want to create related questions for each option. This is because we are going to set up conditional logic for when users choose either of the three options.

You can repeat the process to add your questions. And here’s what our additional question for the ‘Weight loss’ option looks like:

Questions to set up conditional logic

For the ‘Muscle gain’ option, you might want to ask about the user’s dietary preferences.

Because there are so many dietary options, it is easiest to list the most common ones and include an ‘Other’ field so users can type their own.

All you have to do is simply click ‘Add other’ at the end of the option section.

Add Other button in Formidable Forms

Once you’ve done that, an ‘Other’ radio button with a simple text box will be added. If you haven’t already done so, feel free to click the ‘-‘ button for the ‘D’ option.

And here’s what that might look like:

Field with an Add Other option

If there are more fields than needed, you can delete the rest.

To do this, you’ll first need to click on the field. Then, go ahead and click the three-dot button in the top right corner.

Once the menu expands, simply click ‘Delete.’

Formidable Forms' delete  field button
Step 3: Apply Conditional Logic to the Quiz

Now, it’s time to set up conditional logic.

First, you’ll want to head over to the second question about how often users are willing to exercise in a week. Go ahead and click on the field.

After that, let’s scroll down the customization panel and expand the ‘Conditional Logic’ menu item.

The conditional logic menu item in Formidable Forms builder

In the ‘Conditional Logic’ section, you can configure several drop-down menus.

You will want to show the ‘How many days a week will you exercise?’ field if users choose the ‘Weight loss’ option. Here are the settings you will need:

  • Show or hide this field. This is where you can show or hide the ‘How many days a week will you exercise?’ field. You can keep it as ‘Show this field.’
  • Any or all. In this dropdown, you can configure if any or all of the conditions should be met. Let’s keep it as ‘any.’
  • Select field. Here, you’ll choose one from the other fields in the form to set the subject of the condition. Let’s choose ‘What is your primary goal?’
  • Equals and other options. By default, the configuration is ‘equals.’ You can keep it as is.
  • Select option. In this last field, you’ll want to select ‘Weight loss,’ as you want this question to appear for users who choose the option.

If you only want to set one condition, then you can click the ‘-‘ button or leave it as is.

And here’s what the final configuration might look like:

Conditional logic configured in Formidable Forms

Next, let’s set conditional logic for the ‘Do you prefer home or gym exercise?’ field. For this guide, we will try to show the question if users select the other options from the ‘How many days a week will you exercise?’ field.

Go ahead and click on the ‘Do you prefer home or gym exercise?’ field to access the conditional logic settings.

Once you’re in the conditional logic settings, you’ll want to set two conditions:

  • ‘How many days a week will you exercise?’ ‘equals’ ‘1-2 times a week’
  • ‘How many days a week will you exercise?’ ‘equals’ ‘3-4 times a week’
Conditional logic for the exercise field

These settings enable you to keep the ‘Do you prefer home or gym exercise?’ field hidden for users who select the ‘Once a week’ option. For those users, we can recommend the home exercise straight away.

You can repeat these processes for all your other fields. Once that is done, go ahead and click the ‘Update’ button.

Step 4: Set Up Confirmation Redirects with Conditional Logic

Now, let’s switch to the ‘Settings’ tab and navigate to Actions & Notifications » Confirmation.

Confirmation section in Formidable Forms' settings

In the ‘Confirmation’ section, you’ll want to change the confirmation type to ‘Redirect to URL.’

This will open a ‘Redirect URL’ text field, so go ahead and enter the absolute URL to the fitness plan you just created, ensuring it includes the ‘https://’ part.

There’s also an action setting to open the page in a new tab. You can toggle the switch to enable the setting, but we’ll keep it inactive.

Adding URL to redirect users

The next step is to add conditional logic for this redirect.

To do this, you’ll need to click the ‘Conditional Logic’ link and set up the rules. To add more conditions, you can click the ‘+’ button to the right of the dropdown fields,

Setting redirect conditional logic

You can now click ‘Update’ to save your changes.

Step 5: Embed the Chained Quiz in WordPress

With that done, it’s time to embed the quiz form into your WordPress website. Simply click the ‘Embed’ button at the top of the form builder.

Formidable Forms' embed button

You will now see a popup with different embed options.

For example, you can select an existing page, create a new page, or insert the form manually with a shortcode.

Select existing page option for embedding a Formidable Forms' contact form

Now, we are going to show you what the chained quiz form might look like on your website.

Here’s a preview of when users choose ‘Weight loss’ for their fitness goal and ‘Once a week’ as their exercise plan:

Chained quiz when users choose weight loss and once a week

From the screenshot above, we can see that you’ve successfully hidden the ‘Do you prefer home or gym exercise?’ field.

And the following is what it might look like if users select ‘Weight loss’ and ‘3-4 times a week.’

Chained quiz when users choose weight loss and once a week

As we can see in the screenshot, the ‘Do you prefer home or gym exercise’ option appears for users who choose ‘3-4 times a week.’

Now, let’s see how the fields change when users choose the ‘Muscle gain’ option.

Chained quiz when users choose muscle gain and other

Now it’s time to see your chained quiz in action.

You can make a test submission to make sure your conditional redirect works perfectly. On our test website, we filled out the form using the rules we set for redirect.

Making a test submission

Once you’ve finished filling out your quiz, hit the ‘Submit’ button as a quiz taker would.

Then, you should see the matching fitness plan page – here’s what ours looks like:

Redirect users to the recommended fitness plan page

Congratulations! You have now learned how to create a conditional logic-chained quiz.

Bonus Tip: Track and Reduce Form Abandonment

Using conditional logic can make your forms smarter and more engaging, but even the best forms aren’t immune to a common problem: form abandonment. This happens when someone starts filling out a form but leaves without submitting it.

It’s an issue for all types of forms. It could happen with a WooCommerce checkout form, a contact form, or even a newsletter sign-up form. Sometimes, forms feel too long, confusing, or just not worth the effort. And when that happens, people leave.

Abandoned form in WPForms

Form abandonment is a big deal because forms are key to growing your website. They help you get more leads, boost sales, and grow your business.

Plus, here’s the catch: studies show that more than 77% of online shoppers abandon their checkout forms. That’s a lot of missed opportunities.

Fortunately, conditional logic helps significantly reduce this abandonment by hiding unnecessary fields, making your forms look shorter and much less intimidating. By reducing cognitive overload, you make it easier for customers to finish the form.

To get the most out of your forms, it’s important to keep an eye on abandonment rates and figure out where things can be improved. One of the best tools for the job is MonsterInsights, a Google Analytics plugin that serves as the best analytics solution for WordPress.

For details, you can check our guide on how to track and reduce form abandonment.

Frequently Asked Questions (FAQs) About Conditional Logic

Here are some common questions we get about using conditional logic in WordPress forms.

What are the best WordPress form plugins with conditional logic?

WPForms and Formidable Forms are two of the best form plugins for adding conditional logic. WPForms is perfect for beginners with its easy-to-use builder, while Formidable Forms excels at creating complex, advanced forms.

Can I use conditional logic with a free form plugin?

Most free form plugins offer very limited or no conditional logic features. To get full access to this powerful tool, you will typically need a premium plugin like WPForms.

Does conditional logic really improve form conversions?

Yes, it can make a big difference. By showing only relevant fields, you make your forms feel shorter and less intimidating. This can reduce form abandonment and encourage more people to complete them.

How complicated is it to set up conditional logic?

It’s surprisingly simple with the right plugin. Modern tools like WPForms provide an intuitive interface where you can create ‘if-then’ rules using dropdown menus, with no coding required.

Additional Resources for Mastering WordPress Forms

We hope this article helped you discover new ways to use conditional logic. To further improve your forms, we recommend checking out these helpful guides:

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

5 CommentsLeave a Reply

  1. Conditional logic is a very powerful and useful feature of forms which can be used to make the forms more dynamic and engaging based on users input.
    The best thing about conditional logic is that you can address many dimensions in the single form and can attract all kinds of suggestions and feedbacks.
    Moreover, you can easily present curated content based on their responses.
    It feels like a real time engagement is being established between the user and the website.

  2. Thanks for this guide, I will surely check it out to add the functionality to my website. I recently acquired Formidable form but I am still learning to use it effectively. Thanks for bringing out this, conditional logic is what I cherish to show different contents or form based on user input and interaction.

  3. Applying conditional logic using a user interface? Count me in! I use a Contact form from WPForms but haven’t used conditional logic in that. Guess I will have to try! Thanks.

  4. Conditional logic is great because it keeps the form as short as possible for the user while helping me, as the website owner, gather as much feedback as possible. I see conditional logic as a fantastic way to truly tailor the form to the user. In the past, I thought creating something like this would be extremely difficult or would require knowledge of a programming language since I’d have to build the forms myself. That’s why I never tried it. However, with WPForms, you can see how they try to make these relatively complex features as simple as possible for users. I love this plugin and its extensions, and with such detailed tutorials, what seemed impossible is now a reality, even for someone like me who doesn’t know how to code.

    • I had the similar feelings regarding making of the complex logical forms that it would require expert programming knowledge.
      Infact forms related task had always been a pain point for me until I started using wpforms.
      It gives all the features and functionalities required to make any kind of forms.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.