When good forms go bad…
The form, with humble upbringings, was recognized early on for his ability to help people accomplish their tasks. Born with a servant heart, he accepted all types of input with little resistance. Occasionally he would have to remind someone they forgot to provide required information but he never got angry or upset. He always said thank you after they stopped by.
One day, the form moved to a new city. He quickly made friends since other people saw how helpful he was. One of his new friends, Web, introduced him to something he’d never experienced before. “JavaScript? What an unusual name,” said the form. “Just use a little bit. I think you’ll like it,” said Web while snickering.
Alert! What’s that sound? Alert! Alert! Why do I have a terrible headache. Alert! Something is different. “Alert! First Name Required. OK?” Did I just yell that? What happened last night? “Alert! Email Required. Zip Code Required. OK?

O.K. so maybe this fictional account of a form’s real life is a bit dramatic. But I think it’s important to note that sometimes we don’t makes the best choices with technology. In the form’s case, his friend Web introduced him to JavaScript. Now I’m not saying JavaScript is the gateway to bad usability but we should be careful with how we use it. In the form’s case, he used it to provide error messages in an Alert dialog when required fields weren’t filled out. A fairly common practice. One issue with this approach is on Windows-based web browsers it causes a loud system alert sound to play. Should we really yell at our users? Another issue is you have to click the “OK” button to make the dialog go away. If you try to click somewhere else, since the dialog is modal, it yells again.
So how can we stop this yelling? We can still use JavaScript but render the error messages on the screen instead of in an Alert dialog. We can also visually highlight the fields they didn’t fill in. This, in my opinion, is a much better approach than asking someone to figure out what they forgot. Server-side validation should also be used as a degradation strategy for those instances where JavaScript isn’t present or enabled.
To be continued…
Leave a Reply