A
A
Arman2014-09-12 16:04:19
User interface
Arman, 2014-09-12 16:04:19

Save the correct form data or wait until there are no errors?

Hello.
Now I'm working with HTML forms, without Ajax requests. Let's say you need to edit an article in the admin panel, while the article is published on the site. We show the moderator user the form where the old data is already filled in, he edits and presses the "save" button, the browser sends it to the handler, he in turn checks the data and if everything is correct, then saves and says that everything is fine. If something is wrong, it sends back and says what the error is, while in the fields we show the data that the user has changed. Let's say the user specified the phone incorrectly, but changed other data correctly and we show that the error is only in the phone. What is now with the article on the site? All data is updated, but the phone is old? Or do not update the article until we tell the user that everything is fine?
If other entities are attached to the article - tags, pictures, etc. Then they are also updated only when we tell the user that everything is fine.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Neron, 2014-09-18
@Arik

<IMHO>
it's better to keep the correct data, notifying the user that there is also incorrect data. At the same time, saving the previous version of the data that the user entered incorrectly. And update all saved data at once. This is logical because:
1) The amount of work for the user who changes the data is reduced. It updated all entities (text, pictures, tags, contact details) but incorrectly updated the phone. Updating just one phone a little later (in a second or in a month) is a much smaller amount of work than initially.
2) Content consumers get up-to-date information faster. This is important in our time. Well, the fact that out of all the updated information only the phone has not been updated is not as important as if nothing had been updated at all. That is, we choose the lesser of the evils.
IMHO>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question