[drupal-devel] [feature] More flexibility for form_checkboxes and form_radios attributes

drumm drupal-devel at drupal.org
Fri Jul 29 19:58:44 UTC 2005

Issue status update for 
Post a follow up: 

 Project:      Drupal
 Version:      cvs
 Component:    base system
 Category:     feature requests
 Priority:     normal
 Assigned to:  drumm
 Reported by:  drumm
 Updated by:   drumm
 Status:       patch
 Attachment:   http://drupal.org/files/issues/common.inc_6.diff (3.32 KB)

Forgot the patch.

And I forgot to mention that the $attributes argument is not used
anywhere in Drupal core so this does not affect other code.


Previous comments:

Fri, 29 Jul 2005 19:34:45 +0000 : drumm

The attributes argument of form_checkboxes() and form_radios() is
currently used to apply the same attributes to each input tag. In some
cases you might want to have different attributes applied to each
checkbox or radio button. For example, this makes disabling some of the
checkboxes possible.

An example of the usage is

array('somekey' => array('disabled' => 'disabled'), 'someotherkey' =>
(...), ...)

This patch also removes the br tag after each checkbox and radio
button. Drupal.css is used to set the display to block. br is a
presentational tag which often conflicts with using CSS to style

More information about the drupal-devel mailing list