Reset a form to original after successful submission

I have a case where a user may need to submit a form multiple times. Is there a way to reset the form to the original state post submission?

Otherwise, the user keeps seeing the success page (after the first submission). I can add a message to ask the user to ‘refresh page’, but that seems untidy.

Any suggestions?

2 Likes

Try putting this script on the page footer code:

<script>
Webflow.push(function() {
  $(document).on('submit', 'form', function() {
    // Refresh page after 3000 milliseconds
    setTimeout(function() { location.reload(true); }, 3000);
  });
});
</script>

Also, feel free to contact me for further code help and/or customization of third-party plugins

7 Likes

@samliew that worked like a charm!:slight_smile: Thanks a ton.

That’s great. I wrote that code without testing anything.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.