Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I need to have solution for selection/unselection of 3 items.
By default all 3 are selected. The user may unselect up to two options, but cannot deselect all three ('none').
I used 3 checkboxes and when user is trying to uncheck the last one, this ability to uncheck it is eliminated and a message appears next to the checkbox label.
Is this the best way to go about this or are there better methods?
I think you've got a pretty good solution here. All of the answers below make things less clear or more complicated. Add some JS that shows a message when the user tries to deselect the last option.
Making the user unable to uncheck that last check box might be unnecessary since the last box that's checked might be the one the user don't want to be checked. This might be a better solution:
Does the page where these controls are have an ok button or similar? Or is it a properties kind of page where each checkbox - as soon as clicked - has its state saved?
you could prevent the user from leaving in error by giving them an alert telling them that there are options left unchecked and the setting will not be saved. If the user disregards that message, then revert the checkboxes to the last valid state.
What you have checked by default should be based off of the user's most common response.
If it is most common for the user to select all 3, then default to all three checked and handle it the way you described above (I think that seems nice).
If you aren't sure what the most common response will be, you might want to default to having none of them checked, and then in the question above, describe "Please select at least one...(complete with the relevant info for this question/statement)"
Often, such lists are part of a dialog that has an OK or Next> button. This is necessary to indicate that the user has finished making choices.
This button can simply be disabled when no choice is made. This is intuitive enough, even if there is no direct instruction to pick one or more options.
Note that this option fails if you make your dialog more complex, so it's unclear why exactly the Next> button is disabled. This is just an argument in favor of multiple simple steps instead of one complex step.
Maybe the user wants to check Item 2 after unchecking Item 3 and the act of preventing them from unchecking Item 3 is enough to make them leave. Making the final option disabled is confusing because it isn't clear if your app is broken or the selection doesn't count unless you check a second item etc.
Your error message is good and will clearly inform the user. But if you can provide a clue about this error at the outset, you'll avoid some user frustration. If this happens more than once in your app, that tiny frustration becomes cumulative.
Start with a notes under the control heading. Something alone the lines of
You should give users the freedom to select but never pre-select the options for the user. You should give full control to the user for all the decisions that he/she wants to make. When you start pre-selecting options for him/her, user feels "not in control" and kind of "being pushed/forced" (even though that's not your intention).
I would go with, 3 unselected checkboxes by default and an instruction to select at least 2 checkboxes. And your form should be validated according to that rule when user only selects one or do not select at all etc.
Can you allow the user to temporarily deselect all 3 checkboxes without breaking your app?
If so I would allow them to do this and then provide the validation message when the last checkbox is deselected. I would rather be allowed to deselect the option I don't want and then select the one I do than the other way round.
If it is some kind of live filter of a list then I would hide all items on the list when there are no checkboxes selected and replace with a further message e.g. "At least one filter option must be selected"
You are between a radio button and a check box.
A radio button is exactly one.
And with a radio button if you select B then A is un-selected.
A check box is zero or more.
You want one or more.
I think a checkbox is a better as you don't automatically un-select.
Since there is no a standard for 1 or more then I agree with a message.
But I would present it a little different
You are using a lot of real estate
Sorry but I don't know wire frames
Selection Name select one or more (in black)
_item1 _item2 Xitem3
If they try to un-select the last then
Selection Name must select at least one (in red)
_item1 _item2 Xitem3
If you are going to do this a lot in you app then create a specific UI for the 1 or more
e.g. An ellipse (it is kind of between a circle and a box)
Yep, I agree that one should be selected by default.
----- Additional comment below -----
This really depends on the context and what kind of application it is: what the label is and the options provided. That being said, it is a positive experience to add what matters to the user by allowing her to select her desired option(s), rather than requiring her to remove (de-select) what is not important to the user, which is an unnecessary task from the perspective of the user. And like Lauren commented, the default selection should be based off of the user's most common response, or what is most common or popular among your users.
I didn't think I had to stress the point that the previous answer made, as I agreed with it.
Apologies, I'm just starting to use this app, so still learning the community norms, rules and etiquettes.
This really depends on the context and what kind of application it is: what the label is and the options provided. That being said, it is a positive experience to add what matters to the user by allowing her to select her desired option(s), rather than requiring her to remove (de-select) what is not important to the user, which is an unnecessary task from the perspective of the user. And like Lauren commented, the default selection should be based off of the user's most common response, or what is most common or popular among your users.