Community Documentation

User interface best practices

Last updated July 23, 2011. Created by catch on June 25, 2009.
Edited by Bojhan, David_Rothstein, jsims281, Thomas_Zahreddin. Log in to edit this page.

Form Elements

When offering a choice of two options, use a checkbox if the options are easily understood to be the opposites of each other (e.g. yes or no question, turning a setting on or off, etc.). Use radio buttons if the options are not necessarily opposites of each other (e.g. use format A or format B for output).

When offering a small number of choices, use checkboxes if the options can be independently selected, and radio buttons if they are mutually exclusive.

When offering more than 10 options, always use a select list rather than radio buttons or checkboxes.

Never use a fieldset for a single form item.

Fieldsets

  • Don't put a fieldset around the main interaction

Comments

All guidelines related to UI

All guidelines related to UI texts should be moved to http://drupal.org/node/604342.

Page status

About this page

Audience
Developers and coders, Themers

Archive

Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.
nobody click here