Want to show website visitors different content based on their form submission? This guide will show you how to set up WordPress conditional redirect on form submit.
Approximate read time: 4.5 minutes
You get better results and more customers by customizing what your customer sees based on their interests.
Using conditional form redirects to personalize what a customer sees after using a form is an excellent way to use this strategy.
And we’ll show you how to do it in this guide with a simple plugin on your WordPress website.
Want a simple redirect after form submit?: How to Redirect After Form Submit in WordPress [3 Steps!]
What is conditional redirect on form submission in WordPress?
A conditional form redirect allows you to redirect visitors to specific pages based on their form answers.
Whether it’s products, contact forms, or login redirects, it’s a great way to improve the user experience.
Imagine you own a bakery.
One customer chooses cakes, and another chooses donuts. You don’t want one big page for them to scan through. That doesn’t keep site visitors on your site. It drives them away.
Instead, you redirect based on their needs.
Cake lovers get to bask in all your cake glory. And donut fanatics stare in awe at your amazing glazed donuts.
Everyone only sees what they want. And that’s important for personalization and a better user experience.
So, now you know the what and the why. It’s time to get to the how.
How to set up automatic redirect in WordPress
With Formidable Forms, you can easily create any form you want using its simple drag-and-drop form builder.
You may think you need a redirection plugin for this, but a form builder WordPress plugin can handle this easily. In addition to many form-building features, you can use its conditional form redirect feature to set up your form to redirect users where you want.
So, there are four steps to follow:
For our example, we’ll use an online clothing store scenario.
Step 1: Create your form
So, go to your WordPress dashboard and click Formidable → Forms to get started.
Click Add New at the top, then Blank Form to start a new form. Give it a name, then click Create
Using Formidable’s drag-and-drop builder, you can easily add any field you want to the form.
So, we’ll add a dropdown with six options:
- Baby clothing
- Boy’s clothing
- Girl’s clothing
- Men’s clothing
- Women’s clothing
- Shoes & Accessories
You can even take this a step further and add a checkbox for existing customers.
Next, add conditional logic. So, an email and password field will show if customers check the box.
You can offer your loyal customers free shipping or exclusive discounts! We’ll leave this off for now and have customers sign in later to keep things simple.
So, feel free to customize your form to fit your business needs, then click Update to save your changes.
Step 2: Create your landing pages
Now that you’ve set up your form, you’ll need landing pages for each category.
You can design your page however you want. If it makes sense, you can make them more fun with a confetti animation.
Consider the URL slugs carefully. This avoids confusion when creating your redirects. So, for our example, we’ll set up six pages for non-customers with “new-” in the URL. Returning customers will use “returning-”.
So, to make things easy with our form, our new customer URL slugs look like this:
And our returning customer URLs will look like this:
You can customize your URLs however you like, but following a similar pattern will make it much easier for you.
Step 3: Set up your form redirect settings
Next, we'll set up our redirect easily. First, go to your form and click the Settings tab.
Under Actions & Notifications, find the Confirmation button.
Next, scroll down to the Confirmation section and pick Redirect to URL.
Here, we'll enter our first URL: https://mysite.com/new-baby.
Next, we'll add another Confirmation section for our second URL: https://mysite.com/returning-baby.
Then, choose the Add Conditional Logic button for each and add the following statements:
Basically, this tells the form to look at the answers the user gave. If they chose baby clothing and didn't choose returning customers, it'll send them to the URL with new-baby.
If they did choose returning customer, it will send them to the URL with returning-baby
Next, you can repeat this for each URL. So, whatever the user picks, they'll be redirected to the correct URL.
Now, let's get your form displayed.
Step 4: Display your form
Now that everything is created, we need to display it on your website so people can fill it out!
So, head to the post/page where you want to show your form. Then, add a new WordPress block and search for Formidable. Next, select the block and choose your form from the dropdown menu.
Last, update your post/page, and your form is live!
Ready to set up redirects on your site?
Whether it’s a contact form submission or for products, using a redirect on your form can be a valuable strategy.
This post taught you how to create and customize your WordPress redirect after form submission with Formidable Forms. As you saw, doing amazing things with Formidable is incredibly easy.
If you’re a website owner and want to learn more about WordPress forms, check out the best plugins for tracking visitors to improve customer flow!