2 Easy Ways to Redirect Contact Form 7 to Thank You Page

If you’re using Contact Form 7 and want to set up its redirection after the form submitted, this article hits your spot.

The topic of discussion today centers on how to redirect Contact Form 7 to thank you page. Some users may think this action is not necessary at all. However, it benefits both you and your users in many ways.

Not only does redirecting Contact Form 7 to thank you page support tracking form conversion with Google Analytics but it also brings a pleasant personal sense to users. Plus, it keeps you in the know anytime you receive submitted data.

Without further ado, let’s dive into 2 hassle-free ways to redirect Contact Form 7 to thank you page.

Redirecting Contact Form 7 to Thank You Page Manually

Technically, Contact Form 7 redirects to the same form URL after form submissions by default. In other words, you can’t redirect it to a different URL, such as a thank you page after submission by just the plugin itself.

However, according to its developer – Takayuki Miyoshi, we’re still able to redirect Contact Form 7 to a thank you page by making use of its custom DOM event. This event allows you to run JavaScript code to prompt a function in a specific situation.

Simply copy and paste the following code snippet to your functions.php file.

<script>

document.addEventListener( 'wpcf7mailsent', function( event ) {

location = 'http://example.com/';

}, false );

</script>

In this tutorial, we use the wpcf7mailsent custom DOM events. The code above will redirect you to another URL when the wpcf7mailsent event occurs. Make sure you replace http://example.com/ with your actual thank you page’s URL.

Note: This method requires you to play with some code in your theme’s template file. Remember to back up your site properly before making any changes, as a minor mistake can lead to fatal eternal errors.

How to Redirect Contact Form 7 to Thank You Page Using Plugin

If you’re non-techies and not confident with your coding skill, we recommend this alternative – using WordPress plugins. With their help, you can redirect Contact Form 7 to thank you pages without any fuss.

Gaining more than 200,000 active installations, Redirection for Contact Form 7 has proven its growing dominance in this niche. This sole-purposed plugin is created to no other than fulfill the duty of helping redirect Contact Form 7 after submission.

Redirect For Contact Form 7

This simple and lightweight plugin lets you redirect Contact Form 7 to any URLs, including the thank you page. Plus, you can set up to open pages in a new tab or take control over conversion by running JavaScript after form submission.

On top of that, the plugin opens doors to spam reduction by allowing adding honeypot to forms. In case you plan to keep track of submission data, it enables you to store form submissions on your database for future use.

Besides the thank you page, you can also redirect Contact Form 7 to PayPal and collect Stripe payment with its pro version.

So how to redirect Contact Form 7 to thank you page with Redirection for Contact Form 7? Just let you know, it’s even easier than a walk in the park!

  1. In your WordPress dashboard, go to Plugin > Add New. Look for Redirection for Contact Form 7 in the plugin search bar. Hit “Install Now” when the plugin shows up.

install Redirect For Contact Form 7

2. Click Activate and this plugin will integrate with Contact Form 7. Now, go to Contact > Contact Form and choose your form.

Choose contact form

3. You’ll see 2 new tabs named “Actions” and “Extensions” added. Click Action. Select Redirect on the Choose Action dropdown menu. Then hit Add Action.

choose Redirect then Add Action

4. An action shows up. Click on Enable Redirect under Active. This will open a setting menu letting you define your redirection. Fill in the details as below:

  • In Rule Tile: Enter “Redirect to Thank You page”
  • Select your thank you page from the “Select a page” dropdown
  • Toggle the button if you want to open a page in a new tab or redirect as Form Post, etc.
  • In case you intend to delay your redirect, just choose the delayed second. If not, just leave it as default.

Then save your settings.

redirect Contact Form 7 to thank you page's settings

That’s it! Now you need to test your Contact Form 7 after submission to see if it works properly.

Conclusion

This post has walked you through 2 easy ways to redirect Contact Form 7 to thank you page. You can either choose to do it manually or install a plugin and let it handle the task.

If you’re using Contact Form 7, find out how to redirect Contact Form 7 to thank you page brings many benefits. Not only does it simplifies the process of tracking conversion with Google Analytics, but it also offers users a richer personal experience.

Are you using Contact Form 7 for building contact forms? Which add-ons do you use to redirect Contact Form 7 after submission? Share with us your experience in the comment section below.

If you’re struggling with any Contact Form 7 issues, such as Contact Form 7 not sending emails or its vulnerabilities, check out our blog for more useful guides.