Title: Redirection Using wpcf7mailsent
Last modified: December 16, 2022

---

# Redirection Using wpcf7mailsent

 *  [5starcruises](https://wordpress.org/support/users/5starcruises/)
 * (@5starcruises)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/redirection-using-wpcf7mailsent/)
 *     ```wp-block-code
       Hi. 
   
       I am trying to figure out where i am going wrong. I use Oxygen Builder so no child theme. I use code snippets and use this code.
   
   
   
       <?php
   
       add_action( 'wp_footer', function() {
   
       ?>
   
       <script>
   
       var ready = (callback) => {
   
       if (document.readyState != "loading") callback();
   
       else document.addEventListener("DOMContentLoaded", callback);
   
       }
   
       ready(() => {
   
       document.addEventListener( 'wpcf7mailsent', function( event ) {
   
       location = 'https://www.cassies.com.au/thank-you/';
   
       }, false );
   
       });
   
       </script>
   
       <?php
   
       },9999);
   
       I have this active. Do i need to change the code within the form itself from [submit "Send"] to [wpcf7mailsent "Send"] or how do i add the code to the form?
   
       I have looked everywhere to find a video tutorial biut couldnt find anything. I have looked at all the dom event links in C7F as well.
   
       Any help gratefully received 
   
       Thanks
   
       Danny
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fredirection-using-wpcf7mailsent%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/redirection-using-wpcf7mailsent/#post-16294867)
 * Which version of WordPress and which version of the Contact Form 7 plugin do 
   you use on the site?
 *  Thread Starter [5starcruises](https://wordpress.org/support/users/5starcruises/)
 * (@5starcruises)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/redirection-using-wpcf7mailsent/#post-16294872)
 * Hi i have latest version of WP and 5.3.2 for CF7 been trying different versions
   to see if i could get it too work. I use WP Rocket, Perfmatters and Cloudflare
   + Oxygen Builder.
   ThanksDanny
 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/redirection-using-wpcf7mailsent/#post-16295020)
 * Is there any reason to use such an outdated version?
 *  Thread Starter [5starcruises](https://wordpress.org/support/users/5starcruises/)
 * (@5starcruises)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/redirection-using-wpcf7mailsent/#post-16295243)
 * I read that it might be one that it works with i open to using any just trying
   to make it work.
   ThanksDanny

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Redirection Using wpcf7mailsent’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [5starcruises](https://wordpress.org/support/users/5starcruises/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/redirection-using-wpcf7mailsent/#post-16295243)
 * Status: not resolved