Want to redirect customers to another page on your Magento 2 website after form submission? With Blue Form Builder, this is extremely simple. In this article, we will show you 2 ways to redirect users to your wanted page after they submit a form.
- Configure in the form settings
- Use Smart Conditional Logic
Configure in the form settings
Before starting, you first need to install Blue Form Builder. Then, have a form created. (You can look at 5 steps to create a Magento 2 contact form as an example). Also, make sure that you know the page URL you want to redirect customers to.
Now let’s start by following these steps:
- Open the edit mode of a form. On the admin sidebar, navigate to Content > Blue Form Builder > Manage Forms. After choosing your wanted form from a grid, you will land on this page:
- Open Advanced tab and you will see a field named “Redirect on Submit”.
Enter the page URL you want to navigate users to after form submission. Use “/” to let them stay on the same page. Remember to save your settings after finishing.
Note that this way allows you to redirect any customers who successfully submit a form.
Use Smart Conditional Logic
Smart Conditional Logic is a plugin of Blue Form Builder. You need to buy and install it so that it will be integrated with Blue Form Builder. By using this plugin, you can redirect certain customers based on what they fill out. Let’s look at how to do it:
- Open the edit mode of a form. Do the same as in the previous section.
- Click on Plugin tab, then open Conditional Form Fields. Click “ADD NEW LOGIC” to set up the logic. For example, the form has a “Newsletter” field with “Yes” and “No” radio buttons. If users choose “Yes”, they will be navigated to the page “http://example.com/newsletter-subcription-thank-you” after form submission.
- You have to set both the condition and action for the logic.
- First, set the condition by clicking on “ADD CONDITION ROW”. In the first box, choose the wanted field from a drop-down list (in this example, we choose “Newsletter” field). In the second box, choose the condition (we select “is equal to”). Then enter the value for the conditional field in the final box (we enter “Yes”). The condition will be like this:
- Second, set the action by clicking “ADD ACTION ROW”. Choose action “redirect to” in the first box. Enter the page URL you want to redirect users to in the second box, like this:
- Now you’ve finished setting up the logic. Remember to save the logic. You can test how it works by trying submitting the form.
In this article, we’ve looked at 2 ways to redirect customers to another page after a successful submission. You can configure in the form settings to apply to any customers who submit the form successfully. Or use our Smart Conditional Logic plugin to redirect certain users based on their form input. So why not try by yourself and let us know your opinion?