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.

I have a field for which the user may select multiple responses, and is likely to be implemented as a drop-down with checkboxes. The user can select one, two, or many from the list of options. We're even providing a "All options" option to speed things along.

The field has one last requirement though, and that is that the user must select at least one option. They can select and de-select each option independently, but they must leave at least one selected.

Normally with a form we can also do field-validation, but in this case the values selected are dynamically linked into a chart thing and so we're looking for a UI which effectively forces the constraint.

Any suggestions?

share|improve this question
1  
Why force a constraint? Couldn't you just show an empty graph when nothing was selected? –  Marjan Venema Oct 17 '11 at 8:28

4 Answers 4

up vote 3 down vote accepted

A pattern for this problem exists as such:

  1. by default the 'all options' checkbox is checked
  2. once a user checks an 'option n' box, the 'all options' checkbox will automatically uncheck
  3. the user continues to check/uncheck 'option n', if at any point they uncheck all 'option n' then 'all options' automatically checks

This way it is not possible for a user to get into a situation where they have no boxes checked. This exists in many facet-based search tools. An example that comes off the top of my head is LinkedIn People Search (the 'refine by' options on the left of the search results follow this pattern).

NOTE: If you are building a web application you would need to invoke some client-side script and event handlers to make this work, so if your users may not have javascript-enabled then you would have to cover that case also.

share|improve this answer
4  
Good answer - this is indeed how many faceted search systems work - in fact, very often, the 'all options' is implicit but not present, for example JohnLewis.com TVs - If you unselect LCD TVs then you get all TVs - (same for all facets). –  Roger Attrill Oct 16 '11 at 9:34
    
Thanks, I had seen that as well in places (expedia maybe?). I think I prefer the 'all options' being explicit as there is less magic going on for me to discover? –  Jon White Oct 16 '11 at 13:00
1  
The only oddity with the 'all options' approach is - what happens when you try and uncheck the 'all options' checkbox - you can't - it stays checked. (There is no other logical action without preferentially choosing one or more options to be enabled). I don't think that's a major issue - just one to ensure it is catered for and is acceptable in this scenario. –  Roger Attrill Oct 16 '11 at 15:34
    
that oddity is visible here: realestate.com.au/buy –  Erics Nov 4 '11 at 13:32

I am not certain that this will help, because i have no idea what is the type of the content, but one solution might be to isolate the process of selection (in a popup or so), and in that separate moment you notify your user that he cant deselect all the checkboxes, and that at least one needs to be selected (in case user deselects all). If there is lots of choices maybe it is better to have them in a popup because of the problem Inca already mentioned too.

Depending on the content you can put the most common choices visible, and then toggle popup if they click on "Show more"...

share|improve this answer

If falling back to a default (such as 'all countries') cost too much (performance-wise), you might consider graying out and freezing the graph with a message displayed.

The restraint of having one country selected always can be frustrating if you want to select (say) Zambia instead of Afghanistan: you can't just unselect the one you're at (Afghanistan) and then scroll down and select Zambia, rather you need to scroll through the list twice, because you must select before unselect. That is not very user friendly.

share|improve this answer

Why not just show an alert/validator-tip when the user tries to move forward without any item selected? Is it necessary for users to know of this requirement, even if they already fulfilled it without knowing about it?

share|improve this answer
1  
Imagine if the control was for selecting which countries' populations over time were to be plotted for comparison, and as each country is selected it updates a graph. We could plonk a message into the middle of the graph saying "hey, if you want to see a graph of populations ya gotta select at least one country." –  Erics Oct 16 '11 at 8:09

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.