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 things.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | common.inc_6.diff | 3.32 KB | drumm |
Comments
Comment #1
drummForgot 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.
Comment #2
drummI'm going to let this wait until after the new form api is in place.
Comment #3
forngren commentedFixed with FAPI
Comment #4
(not verified) commented