pixelmund / svemix

The Full-Stack addition to SvelteKit. Write your server code inside svelte files, handle sessions, forms and SEO easily.
https://svemix.com
MIT License
337 stars 16 forks source link

JS disabled forms loose state #12

Closed pixelmund closed 2 years ago

pixelmund commented 2 years ago

Currently if javascript is disabled and a user fills out the form with an error, the errors and data entered will be lost. We would have to come up with a solution to save the form state somehow. I thought about using URLSearchParams but im not sure if this is the right way to do it. I have already began work here https://github.com/svemix/svemix/tree/better-js-disabled-form-handling.

Another solution would be to save the state in the session, but setting up sessions is not required currently, so this would not work for anyone.