In the years i'm programming webforms i always had the instinctive idea i should penalize the user of the forms with an error message and redirecting the user back to the form. I know now that is a wrong line of thinking.
It is wrong because of two reasons
- Users need to fill in some of the fields again
- The need to program the error messages and return of entered data
In the era usability is not a buzz word but a rule to live by it's plain wrong to let the user input data again when it's not necessary.
A scenario : we have three radioboxes; good, bad, neutral. Connected to the bad radiobox are three checkboxes; very, very, very (I didn't think a lot about this).
My normal behavior would be to check if one of the checkboxes was checked. If one is look if the bad radiobox was checked. If it isn't back to the form clearing the checkboxes and radioboxes and an error message on top. This is brutal behavior. At least i could check the bad radiobox and let the checkbox stay checked but then it would be rude to redirect to the form because the only thing i do then is saying how stupid the user is.
Adding error code is another thing. It is annoying because most of the time it is basically the same code. It's the design of the site or the demand of the client that forces you to write the code in a not generic way. Because it is a user input there is always a possibility of a form of an hack attack so you have to check that too before returning the value.
Taking the scenario from above you can add a css class to the label or a message next to the label or a border around the check- and radioboxes, ... .
The best way to deal with the given scenario is to check if a checkbox is checked. If it is set the radiobox value to the bad value and let the user think they did everything good.
You can't do that with every inputfield you have. You have to balance the user/programmer decisions about the input. If some data is necessary to continue you have to set up errors but otherwise make the form filling labor as smooth as possible.
No comments:
Post a Comment