Last active
April 24, 2023 11:39
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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