Streaming live at 10am (PST)

Setting up auto-save for form inputs?

Hey all,

Wondering if anyone has done this, I would like to have the information entered into a form by a user auto-saved/submitted without needing to do the following:

  • Don’t refresh the page.
  • Don’t refresh the form.
  • Don’t need a submit button to be clicked.

I am pretty sure most of you have seen this sort of functionality in apps. Wondering if anyone has achieved this in Webflow?

This can be done with localstorage, but it needs a custom script (though it’s not as involved as one might think).

Add buttons for save and load. Then insert a custom embed on the page with the form and write a script that saves the form values when the save button is clicked and fetches them when the load button is clicked.

Here’s how you set up onclick on the buttons:
https://www.w3schools.com/jsref/event_onclick.asp

Here’s how you set and get localstorage values:
https://www.w3schools.com/jsref/prop_win_localstorage.asp

You could do the save part automatically through a set interval like this:
https://www.w3schools.com/jsref/met_win_setinterval.asp
but remember that this will overwrite the previous save, so if the user clears out the form manually it’ll save it as blank on the next interval.