views:

715

answers:

8

I've long thought (but never practiced for some reason) that a dropdown menu that is dynamically generated and only contains one item, should automatically select that item. This would opposed to the typical approach that I've observed where a blank entry is made at the top and you still have to interact with the menu to make the single available selection.

An example is when I login to my online banking and select "View Paper Statements". I've only got one account so the next step in the process is to present me with a dropdown where I have to select that single account to proceed. In this case, by implementing the solution above, it would take one less click to select the account and proceed to viewing it. Even better in this case would be to eliminate the dropdown menu step altogether and go right to the statement.

Can you think of a case where auto-select of a single item would produce undesirable results?

A: 

If the dropdown were populated as the result of a textbox filter then it's possible that the user could have made a typo, if that happened combined with automatically skipping the next step. That could produce an undesirable result.

But I don't think that anything should be done that is irreversible without confirmation from the user. Having said that, there is an argument against making anything irreversible as most users don't tend to read the confirmation message and just click on "OK" because they're certain that they couldn't have possibly made a mistake!

I have used the automatic selection technique in the past and it worked really well, but in that particular case it wasn't an irreversible result.

Antony Scott
A: 

I agree. If there's only one item in the dropdown and it's required that the user select something, then just default to the single item. I can't think of any negative effects of this (but I'm certainly not a UI expert)

Kevin Tighe
A: 

What I like to do in this instance depends on a few factors.

If the dropdown is a required field and ends up with only one item due to dynamic generation, I try to avoid displaying it as a dropdown entirely. I end up showing it as an uneditable text field instead (or not displaying it at all if it isn't necessary). Why make it even look like it's a choice when it isn't?

If the dropdown is not required, then it makes total sense to display a blank choice in addition to the single value.

Rich
+1  A: 

I completely agree, in the case you describe. But there are times where you want to force the user to make a selection actively -- e.g., when the value of the field is somehow optional or additive.

In your case, without selecting an account, there's probably no useful way to proceed, so automatic selection does make sense. But for example, an application I'm working on allows the user to specify a number of descriptive fields (movie metadata, basically -- title, release year, genre, etc.), many of which are optional, and some of them are represented by drop-down menus. Allowing the user to leave the default selection blank lets him tell us, effectively, "I don't want to use this field," so we leave it blank, and the data remains clean.

Just one example, although you're right -- in your case, I can see how that'd be annoying. :)

Christian Nunciato
If a field is optional, there is more than a single choice. You have blank or the one meaningful value.
epochwolf
That's right, but it's only optional because we accept empty values. I think what the OP's saying is that in his case, an empty selection doesn't make sense, so he's right, it should be automatically selected.
Christian Nunciato
If you have "empty value" *and* another option, there are *two* choices. You should *not* have a dropdown menu with only one choice in that case, because if the user clicks the menu by accident there is no way to choose to empty value.
ShreevatsaR
See the selected answer. That's precisely what I mean.
Christian Nunciato
+1  A: 

If there is truly only one possibility you shouldn't ask a user to decide between Option A. (Bad grammar to illustrate the point)

If the field can be left blank, it's not an option with a single answer. Instead you have a choice between Option A "meaningful data" and Option B "".

Iif list has blank option but the form does not allow that to be blank, it's a choice between Option A. (Bad grammar to illustrate the point)

epochwolf
+3  A: 

Can you think of a case where auto-select of a single item would produce undesirable results?

Yes - any case where the user has the option not to select any option.

In your bank account example, pre-selecting the only value makes sense. But if you have e.g. some kind of form where users can provide voluntary information, they will need the possiblity to leave that field blank or otherwise give a possible incorrect answer.

So it really should depend on the nature of the data in that dropdown whether pre-selection is a good idea or not.

ISW
Indeed, my sentiments exactly. ;)
Christian Nunciato
A: 

If it's REQ and there's a single record/value .. I'd try and change the control to a Display field rather than the Drop Down.

Stu Andrews
A: 

Sometimes you want the user to explicitly select an option, even when it's the only option. If the option is selected automatically, the user may never even realise it, even though they may not be happy with the result.

For example, I'm reviewing my savings account on my internet bank site. Then I go to set up a payment. As it happens, I'm not allowed to make payments from my savings account, so the payment form automatically selects my only other account. If I don't notice this then I will end up making the payment from my other account when I was expecting to use my savings account. If I had known, I wouldn't have made the payment at all.

Perhaps this is slightly contrived. But unless you can be certain that the user will be happy with the (only) choice, you should ensure that they choose it explicitly.

Bennett McElwee