[thelist] with Enter, onBlur is preceded by onSubmit

Ken Kogler ken.kogler at cph.org
Fri Jun 14 10:58:01 CDT 2002


> seriously though, it sounds like you consider form
> submission with the enter key to be a really bad thing.

No, I don't. I consider it to be a convenience. I do it all the time. But
it's been my experience that the, uh, less-intelligent web user out there
can't figure out how to completely fill out a form.

I know you're screaming "then validate your input!" at your monitor, jeff,
so keep reading... :-)

> that's unfortunate as it saves users untold
> amounts of time when dealing with forms as they
> don't have to take their hands from the keyboard,
> move them to the mouse, move the cursor around the
> screen until they've got it on the submit button...

Or they could hit the 'tab' button to move focus to the submit button...

> if there was additional data that was required you
> should have had some validation in place to require it.

I'm getting there...

> unless you spoke with every person that submitted too little
> information and they told you they pressed the "enter" key,
> then you can only assume that was the cause.

We called the ones who got far enough to put their phone numbers in, and
asked them what went wrong. Out of ~40 answers, somewhere around 70% were
"the form submitted itself early" or something along those lines, due to
users not understanding that the enter key would submit the form for them.

> it could have just as easily been a problem with the ui
> not clearly indicating to the user what was required
> and what was optional.

Not discounting that one... I mean, *I* designed the UI. I'm a code monkey,
not a graphic designer... one of the "benefits" of a small school, I guess.

> so partial and even completely garbage data was acceptable then?

It was more acceptable to the administration than taking the time necessary
to come up with validation rules, and the time (and money) necessary for me
to code them.

> why would you never validate data that's coming in from a form?
> (of course, the answer is "what?  not validate data?  that's crazy!").

And that's what I said. The form just took the results and fired off an
email to the admissions people... this was far from a high-tech solution
involving db integration or anything like that. To the people who control
the projects I work on and budget my hours, validation was not a priority
(since this was a "simple" form), until the incomplete forms started coming
in.

When I first built the form, I asked for the validation rules (format for
the phone number, 5 or 9 digit zip code, etc), and the reply I got was along
the lines of "let the admissions people worry about sorting through the
data. Your job is to build the form, not worry about data."

So I smiled that "I'm going to make you eat those words" smile and went
ahead and coded the stupid thing. After the 50th incomplete form came in, I
asked my boss if he wanted me to do some basic validation, and he finally
agreed. Now you can press enter as many times as you want, and each time the
form comes back to you without being submitted with helpful hints about how
to fill it out correctly. It's a beautiful thing.

I think the "annoying and obnoxious" comments that set this thing off were
just some left over hostility towards my job at the school and my boss in
particular. :-)

*sigh*... back to work.

--Ken




More information about the thelist mailing list