Contact Form 7 Redirect on Submit


In this blog post, I am going to be sharing with you how to set up custom redirects using Contact Form 7. Here is how this will work. When a user submits the form, they will be redirected to the URL that you set. Now first, I would like to talk about some practical use cases on why you would want to do this. Say if you were creating a funnel or squeeze page where the email opt-in is step 1. Then the user will be redirected to the second step having this redirect will allow you to do this. Or maybe you’re giving away a free book or digital download in return for your visitor’s email address. After a user submits the form, the user can be redirected to a page where they can download the file. Or maybe you want your visitor to be redirected to a custom thank your page or the next step in your sales funnel.

So how do you set this up?

Well, it’s straightforward. You just add a snippet of javascript below your contact form and replace the URL and your content form ID. Your ID can be found in the shortcode below the title for your contact form. Here is the code…

When you’re done it should look something link this. If you have a custom Javascript file you can use this code in that file as well you will just have to remove the script tags.

Now there is a WordPress plugin that will allow you to accomplish the same thing. However, I don’t like to use plugins unless I have to. For a simple DOM manipulation personally, I would rather do it with javascript. But, here is a link to the plugin if you would rather do it that way. Now I have used this plugin, and it does work. I would recommend using if you don’t want to be manually adding this code. That’s all for this post. Feel free to share your thoughts in the comment section below.

Top
LIGHTS
>