Daniel Morrison

Keep Your Forms Stupid

Twice in the last 24 hours I’ve been attacked by web forms trying to be too smart. Both times Safari’s AutoFill has shown the problem, but I don’t blame Safari. I blame web apps that are trying to be too smart.

On the first site, Safari tried to autofill my name, address and email (which was the desired effect). Unfortunately, this triggered about 10 Javascript messages that “Pasting into this field is not allowed”. Very annoying, and also wrong. If I’m pasting, I likely know what I’m doing. Maybe my email address or password is long, so I copy and paste them from somewhere else.

The second site’s form accepted Safari’s autofill, but Safari did goof and put my cell phone into the Home, Work and Fax boxes. This was an easy correction, but their Javascript tried to auto-tab between fields. Phone fields were broken up into Area Code & Number, so I had to delete out of 2 boxes. Unfortunately, since they were already filled, every time I tried to go back, it would tab me out of the field. Also, it seemed to be blocking my delete key!

These are great examples why accessibility folks recommend against “non-standard” form behavior. By trying to be too helpful (or controlling), I was frustrated and hindered.

Keep your forms stupid. Let us be smart.

2 Comments

  1. elliott cable — April 13, 2007

    But aren’t some ‘smart forms’ as you call them useful?

    For instance, not showing a Zip Code field unless you select ‘United States’ from a country drop down.

    Autofill might mess it up, but it’s simple, just autofill twice or whatnot…

    I have to agree, I don’t know what form you’re talking about that wouldn’t let you paste into or, or wouldn’t let you delete, but that’s crap design. Somebody needs to grow a working brain IMHO.

  2. Daniel Morrison — April 13, 2007

    Elliot,

    You’re point is good that some enhancements can be useful, but every form should be usable under any conditions.

    Javascript should be used unobtrusively, and forms should be usable without it. I think too many developers put too much focus on client-side solutions that get in your way, instead of making server-side smartness.

    Example: Don’t split up phone number fields into more than one box, or make me format it a certain way. Do that on the server. Computers are great at this.