Somewhere on your website, you need such options like to lead generation with free content download. You create an on-click button to open a form to fill out before downloading the free stuff.
They are 2 ways to add the option of redirecting contact form 7 by simply adding JS code in your contact form 7 backend and another step to install any one of the plugins as listed below
Method 1: Using JS Code
To create this redirection option in WordPress contact form 7 you need to add the below JS code in your contact form 7 back-end. In the location add the URL of the download product or your free giveaway product link.
/**** Redirect Contact form 7 JavaScript code ****/
<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
location = 'http://example.com/';
}, false );
</script>
![contact form 7 redirect after submit using javascript code](https://sp-ao.shortpixel.ai/client/to_auto,q_lossy,ret_img,w_840,h_306/https://www.btechiot.com/wp-content/uploads/2023/08/redirection-contact-form-7-Javascript-code-1-840x306.png)
Method 2: By using WordPress Plugin
For the Alternate Method to use redirection on contact form 7 by installing WordPress plugins, we listed some redirection plugins which tested practically.
Redirection for Contact form 7:
![redirect for contact form 7 WordPress plugin](https://sp-ao.shortpixel.ai/client/to_auto,q_lossy,ret_img,w_738,h_259/https://www.btechiot.com/wp-content/uploads/2022/11/redirect-contact-form-7-plugin.png)
After installing this plugin you will accept all access and you can see the action option in your contact form 7 back-end as shown in the below figure.
![create action in redirect contact form 7](https://btechiot.com/wp-content/uploads/2022/11/redirect-contact-form-7-plugin-create-new-action-840x436.png)
create a further action and choose the page to be shown after redirection to apply redirection to your contact form 7 and enable the option to open in a new tab
![enable options to shift the URL after form submission](https://btechiot.com/wp-content/uploads/2022/11/redirect-contact-form-7-plugin-action-option-840x524.png)
![](https://sp-ao.shortpixel.ai/client/to_auto,q_lossy,ret_img,w_840,h_491/https://www.btechiot.com/wp-content/uploads/2023/08/contact-form-7-redirect-to-thank-you-page-action-option-600x351@2x-1-840x491.png)
Contact form 7 Redirect & Thank-You Page:
![wordpress plugin redirect contact form 7 to thank you page](https://btechiot.com/wp-content/uploads/2022/11/contact-form-7-redirect-to-thank-you-page.png)
After installing this plugin you will get the redirect option in your contact form 7 WordPress back-end as shown in below pic.
![redirection contact form 7 option](https://btechiot.com/wp-content/uploads/2022/11/redirection-contact-form-7-thank-you-page-plugin.png)
You first create the thank-you page, add it here, and check the enable redirection.
![select the destination URL and enable URL redirection](https://btechiot.com/wp-content/uploads/2022/11/redirection-contact-form-7-thank-you-page-plugin-00.png)
Control for redirect Contact form 7:
![controls for contact form 7 and analytics and tracking wp plugin](https://btechiot.com/wp-content/uploads/2022/11/redirect-and-control-contact-form-7-plugin.png)
This plugin will add a new tab option of customize in your contact form 7 back-end and you can track your contact form.
![enabled customize option in contact form 7](https://btechiot.com/wp-content/uploads/2022/11/redirect-and-control-contact-form-7-plugin-customize-840x560.png)
![add redirection url](https://btechiot.com/wp-content/uploads/2022/11/redirect-and-control-contact-form-7-plugin-options-840x492.png)
Now for each form, you can apply the redirection option and parallel you have another option to enable Google to recapture & tracking the contact form report.
Conclusion: I recommend simply using the JavaScript code to redirect contact form 7. Adding more plugins will slow down your WordPress Website.
If you looking for validation of a contact form or to build a contact form in HTML and CSS check the below resources.