Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
77f6f233
Commit
77f6f233
authored
May 05, 2005
by
Dries
Browse files
- Modified patch
#21980
by willmoy: made form_group() accept HTML attributes.
parent
6658273b
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
77f6f233
...
...
@@ -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
"
;
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment