Streaming live at 10am (PST)

Reset a form to original after successful submission


#1

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

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


#3

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


#4

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


#5

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