Skip to content

Instantly share code, notes, and snippets.

@nigel-v-thomas
Last active April 24, 2023 11:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nigel-v-thomas/a0ef5f67c6182f9a968ac68fbfc21720 to your computer and use it in GitHub Desktop.
Save nigel-v-thomas/a0ef5f67c6182f9a968ac68fbfc21720 to your computer and use it in GitHub Desktop.
Contact Form 7 Redirecting to another URL after submissions - use this alternative to fix issue where form redirects before send is complete
<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
setTimeout(function(){
window.location.href = 'https://example.com/thank-you/';
}, 5000);
}, false );
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment