Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

In web development, html , what is the best input type to be used if users are only given two choices? basic true or false for example? active or inactive?

my choices are: two radio buttons, dropdown lists with 'true' or 'false', textareas? (probably not).

I'm actually confused whether it's more valueable for the users to have less clutter (dropdown) or obvious selections (radio buttons).. what's the best input type if there are only two choices?Thanks!

share|improve this question
1  
it seems like you're missing the most obvious: checkboxes. –  L. Möller Oct 18 '13 at 7:26
    
no no.. you only have two options.. it's either true or false.not both. –  muffin Oct 18 '13 at 7:27
3  
thats exactly what a checkbox is... –  L. Möller Oct 18 '13 at 8:04
add comment

2 Answers 2

up vote 5 down vote accepted

In a scenario where the user has to select simple true/false or active/inactive states then I would really suggest that you use a checkbox control rather than a control which would feature redundant input, eg:

mockup

In a case such as this there is no reason to add additional input controls which provides the same result as a more simple checkbox control. Either the sync is on or not, the sync being not ON is the same as the sync being OFF.

However, there are of course cases where two alternative answers can't be provided with a simple Yes, I agree with what the checkbox label says. Such as:

mockup

download bmml source – Wireframes created with Balsamiq Mockups

This would be very confusing to try and convey using a checkbox control. So it's really all about what type of question you're asking.

But regarding whether you should use a radio button control or a dropdown for these types of questions, for a two alternative question definitely go for the radio button since that provides a better scanability of a form etc.

share|improve this answer
add comment

This depends on the meaning of the input and whether you make one of the alternatives initially selected (i.e., the default). Since it should normally be obvious at a glance to the user what the choices are and whether one of them is the default, radio buttons are normally the best way to go.

It would be poor usability to force the user to open a dropdown menu just to see the other option. Except perhaps in a very simple case where the alternatives are e.g. Yes and No.

A textarea would hardly make sense, but a single-line input box might be OK in rare cases where you really want to make the user type the answer, even though only two answers are accepted.

Note that in many cases, there should be more than two choices even if the situation superficially calls for a simple setup with two choices. For example, in addition to alternatives like “male” and “female”, it might be adequate to have the choice “don’t want to tell”

share|improve this answer
    
okay..what if there's no 'dont want to tell' option? just male and female? –  muffin Oct 18 '13 at 7:37
    
Even then, it is best to show the options, instead of using a dropdown. It immediately tells that these are the options and which, if any, is the default. If neither is set the default, the user still has the “don’t want to tell” option, just implicitly (do not select either). –  Jukka K. Korpela Oct 18 '13 at 7:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.