Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
inkt11668yyou can save the value of the field in a cookie. then populate the fields value if there is a value for that specific field in the cookie.
-
I second localStorage. Straightforward and no plugins necessary. MDN has solid documentation.
-
surgiie15258y@noonesboy @champion01 i wrote something once for a small form on an old site that used sessionStorage. I wrote this in a quick pinch with not worrying about if it was best or most effecient way to do it. Now that i have more free time id like to go back and change/optimize it because im a bit sure that this is sloppy and likely to not function with other libraries. That being said, heres the code:
https://gist.github.com/surgiie/... -
@surgiie I'm on my phone but the code looks good.
I typically work in angular, and for this I would make a directive. -
surgiie15258y@champion01 https://github.com/surgiie/...
I made some enhancements. Devs can define either session or local storage via custom data atttribute.
Any recommendations on a jquery/js plugin that saves form fields in the scenario where the user left the form or page they can come back and still have the values from when they left. I wrote up some thing for a small form on an old site using sessionStorage api but I need something that can work with any form or perhaps multiple forms at once. any good plugins out there?
undefined
webstorage formsaver jquery