|Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable.|
Moodle User Interface Guidelines > Radio button
There are multiple choices, of which the user can only select one.
You are designing a form.
Forces: factors that affect selection
- Radio buttons and dropdown menus are too verbose for a binary choice: use check boxes instead.
- Dropdown menus hide the other choice
- Some times there is no room for a set of radio buttons
Create a set of radio buttons, each with an id attribute. Add a label for each radio button after the radio button (in left-to-right languages, on the right of the radio button). As the text content of the label element, write the result of selecting the radio button in question:
Show me the () Money () Way to happiness () Glimmering light of an LCD screen
Moodle forms have a left column for the descriptions of the elements in forms, and a right column for the element itself. Radio buttons should have a easy-to-scan short caption on the left column, so that items are easy to find.
Display of desired things Show me the: () Money () Way to happiness () Glimmering light of an LCD screen
Determine a reasonable default for the value of the set of radio buttons. The reasonable default should be such that if a user does not notice the option, they probably do not mind leaving it to default. If no reasonable default can be determined, you can make the set of radio buttons a required field and have none of the radio buttons selected by default.
Do not express the option label as a question: "Do you want to see the money?"
Do not invert the option to negative voice: "Don't show me the money". Most times, only positive voice should be used.
Do not use radio buttons or dropdowns when there are only two choices.
Examples and implementation
Related issues in the tracker
- MDL-19659 - Usability test: Proper display of configuration variables' default values; related: http://moodle.org/mod/forum/discuss.php?d=124533