I'm looking to get the success message after a form submission to fade away after a few seconds

We will have an iPad setup for multiple users to enter their email address on the landing page and easily sign up. The issue I’m facing right now is that once a user submits, the success message stays on screen, and never goes away until a user forced refresh. We want multiple people to be able to easily come to the iPad and sign up without us/them having to refresh the page after each sign up.

If anyone can help that would be greatly appreciated. Thanks!


Here is my public share link: LINK
(how to access public share link)

1 Like

Paste this in Page Settings > Custom Code > Footer Code to make the page refresh after 5 seconds after a form submission:

<script>
var Webflow = Webflow || [];
Webflow.push(function() {
  $('form').submit(function() {
    setTimeout(function() { location.reload(true); }, 5000);
  });
});
</script>

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

7 Likes

Thank you so much! Such a simple fix. You definitely made today a lot easier :slight_smile:

Did it really work? I didn’t even test that.

If you want to show the success message after 5 seconds, AND then redirect to a different page:

Change

location.reload(true);

to

window.location = "http://samliew.com";
1 Like

It actually did exactly that with the first script you sent over. Shows the success message for 5 seconds, then basically refreshes the page.

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