irwxpq
Last Updated: February 25, 2016
·
726
· zaus
D940dd93751cea6229c4b9b2098b7f39

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);
});
Say Thanks
Respond