Saving user inputs

I would like to know how to save user inputs even if the user closes the website. I have a series of dropdown menus and text inputs, is it possible for all users to see the same inputs made by other users? Thank you.

Depending on what you want to do with the user inputs, you can simply look at using the local option from Wix Storage API.
https://www.wix.com/corvid/reference/wix-storage.html

There are three types of storage:

  • Local: Data in local storage never expires, even if the site visitor closes your page. When the visitor reopens the page later, the data can still be retrieved. You can store up to 50kb of data in local storage.

  • Session: Data in session storage is available while the site visitor’s web session is active. The session ends when the visitor closes the browser tab or window. When the session ends, all the data in session storage is lost. Reloading or restoring the page does not affect session storage data. You can store up to 50kb of data in session storage.

  • Memory: Data in memory storage is available as long the site visitor does not refresh or close the page. Reloading or restoring the page clears the memory storage data. You can store up to 1mb of data in memory storage.

Hello Michael,

GOS what about just using a database for this ?

I would like to just save the data locally for the users to see it even if they close the window and reopen it again. I would assume that I use the local type of storage, correct?

Yep, it just depends on what the user is actually doing with the user inputs.

If it is a form that needs submitting to a database then yes they can use it and simply set the user inputs value from that.

Plus, if it is for multiple users to see the same value in the user input, then presetting it from the database field itself would be a better option, as it won’t be purely set for that one user.

If it is just for the one user to store their user input values into for if they close the page or don’t save the form etc, then using local option from Wix Storage would be ideal.

All depends on what the user here needs.

I would like multiple users to see the same value in the user input, how would I do that?

Ok, i agree with you. Depends on the use. Thx for conformation.

@givemeawhisky
Is there a way to share Local storage selections?

For example: If a customer makes his/her selections and those selections populate on a page with a repeater, Is it possible to generate a share link to reproduce the selections on another persons browser, for example?

Yes it’s possible with QueryParams .
You can read an example here .