<< Open Source Java | Home | Autoboxing This >>

ComboBoxes for Entering U.S. States Are Lame

I live in St. Louis, MO. And I'm tired of filling out online forms where I have to deal with combo boxes like this:

State*:

This is usually part of an address form where I can pretty much fill out everything by typing in the information and then tab to the next field.

The combo box breaks that flow, forces me to pick up the mouse and click on the down arrow, scroll down so that my state is visible and then select the state.

I know the combo box can be operated with the keyboard. But to get to Missouri, I have to type "M" seven times.

All the while, the task could have been accomplished with two key strokes: by typing "MO".

Someone may argue that the combo box prevents people from entering a two letter combination that's not a state. This argument simply doesn't hold water. Why is it then I'm trusted to type in my street name and city name? Aren't they worried that the city name is non-existent?

The whole thing is silly, a misguided design propagated by ignorant programmers. You've just turned a two key strokes worth of work into three mouse gestures or seven key strokes (eight for Montanans and North Dakotans).

Make it a validated text field!



Re: ComboBoxes for Entering U.S. States Are Lame

You can always use Firefox (and probably normal Mozilla). Then you'd only have to type Misso (given your example box)... Or you could not live in the US like me and you wouldn't have the problem :)

Re: ComboBoxes for Entering U.S. States Are Lame

The ultra-great solution is just ask the end-user their zip-code. Then you can use a zip-code web-service to retrieve the city, state info. :b

Re: ComboBoxes for Entering U.S. States Are Lame

You're not the only one that thinks that Sometimes Plain Text is Best.

One way that works fairly well is to use Javascript "autocompletion". If you'll excuse the promotion, in a PHP project I've been involved with we have a "taglib" for taking care of generating the javascript. The demo is here. You use the "inputautocomplete" tag as shown in this template. The PHP page controller here uses the same list of countries that generated the Javascript to validate the submitted reponse server side (try entering an invalid country in the example).

Re: ComboBoxes for Entering U.S. States Are Lame

Don't touch my Lobster! On behalf of everyone in Maine, this whole "validated text field" for state entry thingy must NOT be allowed to happen!

Re: ComboBoxes for Entering U.S. States Are Lame

The Open Source advocate in me liked the Firefox recommendation. As soon as Firefox start to support the Home Page Group feature that I rely on in Mozilla I'll switch to it.

The programmer in me liked the autocompletion feature. I remember implementing it a decade ago, with binary search. It was called Quicken Style ComboBox then.

However, as a ordinary user, I must say I don't really care what technical solution is used as long as I can take care of the state field with a Tab-M-O-Tab.

I wish the widget set in a browser were more functional. Come to think about it, there is no technical reason whatsoever that we cannot have an editable combobox in HTML. We should have trees and tables and menus too, just as in Mozilla.

Zip code look up sounds good but needs more than a few web services to make efficient. Inaccuracies in the master database, due to redrawn municipal boundaries that is not picked up immediately by the service providers, etc., would frustrate quite a few users.

Re: ComboBoxes for Entering U.S. States Are Lame

I am only picking at the terminology here...

The problem that you are having is not that the combo box is misbehaving. The problem is that it is a "list box", not a "combo box".

A "combo box" is, as its name implies, a combination of a text box that you can type into and a list box that provides some suggested values.

Re: ComboBoxes for Entering U.S. States Are Lame

Widgets aside, I usually use "N <up-arrow> <up-arrow>" with select lists like this one when I need to choose "Missouri". Three keystrokes makes it less annoying. (Not sure what you do if you live in Michigan...)

I'm from Arkansas, which is not and never has been "AK", but I used to receive lots of mail from people who used that state code incorrectly. Never from people who also lived in Arkansas, though.

Perhaps people can be relied upon to type their own state code correctly, but you're not always typing your own state code. I suppose the somewhat standardized use of a select list such as you describe is a choice of accuracy vs. speed.

It's not the ComboBox's fault

Weiqi Gao complains that combo boxes are lame because you can't type in them. He gives a good example of the state abbrevation MO for Missouri; in a typical drop-down list of US states, you need to go through seven...

Add a comment Send a TrackBack