Form with in 3 steps persistence of data [closed]

-1

I have to make a form with 3 steps, in each step before moving on to the next one, you have to record the data in case you go back to the ones that have already been filled out. The idea is to make 3 views (3 pages) one for each step of the form.

  • How can I save the data so it does not get lost when I go to the next page?
  • Can you do a static class that saves them?
  • Should you do better with sessions?
asked by Popularfan 17.07.2018 в 17:24
source

1 answer

1

You could leave that data in the client's browser, with WebStorage

link

Example of use:

link

Also leaving the variables in the Session of the user,

link

The other would be to save it in Database, or Cache , but for your case I would not recommend it.

As for the static classes, you could generate a variable that persists the data, but being in a web environment you should create one for each user that uses the form or an array of these and ... the less load the web server, better so it would not be recommended in this case.

Greetings.

    
answered by 17.07.2018 / 17:28
source