Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use this code snippet if you'd like to display a text confirmation before redirecting the user to another page/url with Gravity Forms.
/**
* 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