Code

Reload Page after Form Submit

Automatically refresh your Webflow site's page after a form submit with this Javascript snippet. A great way of indicating that a form has been submitted to a user or refreshing the page for another submission.

Reload Page after Form Submit preview

Automatically refresh your Webflow site's page after a form submit with this Javascript snippet. A great way of indicating that a form has been submitted to a user or refreshing the page for another submission.

How to add it

  1. Add the Javascript snippet to your closing body section.
  2. Update the 7000 to your required time frame in MS

The code

Javascript
                      <!-- Add to your closing body section -->
<!--Refresh page after 7 seconds of form submission-->
<script>
Webflow.push(function() {
	$(document).on('submit', 'form', function() {
    setTimeout(function() { location.reload(true); }, 7000);
  });
});
</script>

                    

Browse similar code snippets

Categories

Language

More from Corey Moen

Profile →

Related Webflow questions

All answers →

Similar code snippets

All code snippets →