jquery - Any good way to save an unsubmitted form? -
i know it's difficult task, there way save form input when user navigates different page without submitting, when come won't have re-enter info?
i'm using rails 4, simple form, , jquery, i'm open solution isn't ugly hack.
the jquery serialize function may friend here. serialize on way out , save db or localstorage , reverse when come page.
http://api.jquery.com/serialize/
alternatively loop through elements , store them in array/object store in localstorage , on re-entry re-populate values of form accordingly.
Comments
Post a Comment