Currently you can choose a select list as a widget for a Boolean.
That is because we currently cannot limit cardinality per field-type. That means a boolean can have any number of values, in which case it makes sense to have a select list, but ...
...then it's not a Boolean anymore!

Therefore, IMO we should just hide that option from people, because it really doesn't make any sense.
People who want to make super-crazy-multi-value-boolean-fields can do a hook_widget_info_alter() anyway, so it's not really that big of a deal. But it really confused me, when I saw it.

CommentFileSizeAuthor
boolean-vs-list.patch1.2 KBtstoeckler
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman’s picture

Completely agree.

+ 'default_widget' => 'options_buttons',

buttons?

tstoeckler’s picture

I guess that name was chosen (not by me!) because it can be either radios or checkboxes, so buttons is sort of neutral. I guess.
http://api.drupal.org/api/function/options_field_widget_info/7

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

ok thx.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.