L
L
Leopandro2016-06-30 17:43:53
JavaScript
Leopandro, 2016-06-30 17:43:53

How to keep a big shape quickly?

In general, I was asked to make a form with 15 fields, accidentally clicked reload - all the data merged. Is there such a function that automatically saves by the entered form id or by some parameters and loads the form? Or should I just do it myself. Can this be done using YII2?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nikfakel, 2016-06-30
@nikfakel

You can save everything in local storage - we hang the handler on all fields, when change, we save it in local storage. When loading the page, we check if there is something in it, when submitting the form, we clear it. For jQuery there is a plugin for convenient work with it.
It is probably also possible to organize on PHP, but it seems to me too difficult.

O
Oleg, 2016-06-30
@politon

By default, the data in the form is saved on reload.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question