E
E
Eugene2020-05-22 09:45:54
PHP
Eugene, 2020-05-22 09:45:54

How to save form data correctly?

Good day. There was a question how to save the data from the big form.
There is a form, divided into logical blocks, divided with the help of a wizard, for step-by-step filling.
5ec77485c1e22906342868.png
Now the question is how. save the data in the database every time after moving to the next step, or pre-collect all the data in VUEX and only then send it entirely to the server?

I would be grateful if you share articles or literature on the design of such mechanisms

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
FanatPHP, 2020-05-22
@SpaceJesus

From a usability point of view, it is better to keep intermediate steps.
Articles are not needed here. You just need to imagine yourself in the place of a user whose browser is frozen, or who urgently left, and when he returned, the session was already rotten, or an error occurred when saving all the data in a crowd. And compare your emotions when you need to enter everything again or just what you did not have time to enter before.
If all data is required for further work with the site, then this is also done as standard - with a flag, just like with email confirmation: before using the site, you must download all the data.

S
Sanes, 2020-05-22
@Sanes

If partial data is allowed, then you can save each step. If everyone is needed, then at the last step.
As in the example, it is usually split and the user can then come back to complete the missing data.

P
Pan Propan, 2020-05-22
@mgis

For the form, make a separate component, and then v-model will help you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question