Preserve Form Values Across Page Reload
See Gist: https://gist.github.com/zaus/4717416
Preserve form values across page loads -- i.e. persistent forms. Uses localStorage
to persist, jQuery
for utilities.
Usage example in gist, essentially:
var $form = $('form');
var repo = new FormRepo();
repo.restore($form); //
$form.submit(function (e) {
repo.preserve($form);
});
Written by Jeremy
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Localstorage
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#