Commit 77f6f233 authored by Dries's avatar Dries
Browse files

- Modified patch #21980 by willmoy: made form_group() accept HTML attributes.

parent 6658273b
......@@ -1051,11 +1051,13 @@ function form_item($title, $value, $description = NULL, $id = NULL, $required =
* The form items within the group, as an HTML string.
* @param $description
* Explanatory text to display after the form item group.
* @param $attributes
* An associative array of HTML attributes to add to the fieldset tag.
* @return
* A themed HTML string representing the form item group.
*/
function form_group($legend, $group, $description = NULL) {
return '<fieldset>' . ($legend ? '<legend>'. $legend .'</legend>' : '') . $group . ($description ? '<div class="description">'. $description .'</div>' : '') . "</fieldset>\n";
function form_group($legend, $group, $description = NULL, $attributes = NULL) {
return '<fieldset' . drupal_attributes($attributes) .'>' . ($legend ? '<legend>'. $legend .'</legend>' : '') . $group . ($description ? '<div class="description">'. $description .'</div>' : '') . "</fieldset>\n";
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment