Contact form 7 redirect to thank you page

[ad_1]

I’ve been trying to redirect my contact form when submitted to a thank you page but having no luck whatsoever, I have inserted the code from the contact form 7 guide for a redirect into the theme editor but it doesn’t do anything, could someone please let me know what I’m doing wrong as I’m at my wits end haha

Thanks

[ad_2]
1 Comment
  1. You can use an snippet:

    `add_action( ‘wp_footer’, ‘mycustom_wp_footer’ );`

    `function mycustom_wp_footer() {`
    `?>`
    `<script>`
    `document.addEventListener( ‘wpcf7mailsent’, function( event ) {`
    `location = ‘https://example.com/’;`
    `}, false );`
    `</script>`
    `<?php`
    `}`

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer