Answer the question
In order to leave comments, you need to log in
How to save form data after navigating to another page?
There is a form on the page, submmit
no buttons!
How can you save form data when the page is reloaded or the user navigates to another page!
I work with yii2
. Perhaps there is a ready -made jquery
plugin?
I tried to make $('#form').submit()
the result seem to be there (the data is saved), but when it goes to the controller where the form is saved, you need to redirect somewhere or go to an empty browser page! Perhaps you can make the controller just run and return nothing?
Or what is the best way to implement it?
Answer the question
In order to leave comments, you need to log in
Doing ajax send when focus is lost is the most correct option.
You can also write to the localStorage or sessionStorage of the browser, according to the situation
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question