Last active
December 20, 2021 20:18
-
-
Save chrisegg/1618874380d71285d685e1a73cde53cd to your computer and use it in GitHub Desktop.
Use this code snippet if you'd like to display a text confirmation before redirecting the user to another page/url with Gravity Forms.
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
/** | |
* GravityRanger | |
* https://gravityranger.com/display-text-confirmation-before-redirecting-gravity-forms/ | |
* | |
* Used to display a text message after a form is submitted, but triggers a redirect 2 seconds after message is displayed. | |
* | |
* Instructions: Copy and paste lines 11-17 into a Gravity Forms text confirmaton. Make any necessary changes to the text or number of seconds, i.e 2000 = 2 seconds, (line 16). | |
* | |
*/ | |
Thank you for your submission. Please stand by, something exciting is about to happen... | |
<script type="text/javascript"> | |
setTimeout(function() { | |
window.location = 'https://yourdomain.com/thank-you/'; | |
}, 2000); // 2 seconds | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment