Sunday, March 15, 2020

How do I create Contact form 7 redirect after submit to any page?

As you know, Contact Form 7 redirects to the same URL as the form’s URL after form submissions in the default settings. However, in very rare cases, you might need to change this to make it redirect to another URL after submissions. I’ll write in this post how you can set up Contact Form 7 to do just that.
As an option you can add following code:
  1. <script>
  2. document.addEventListener( 'wpcf7mailsent', function( event ) {
  3. location = '';
  4. }, false );
  5. </script>
Here is detailed step by step tutorial:

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.