theme_fieldset
- Versions
- 4.7 – 6
theme_fieldset($element)- 7
theme_fieldset($variables)
Theme a fieldset form element.
Parameters
$variables An associative array containing:
- element: An associative array containing the properties of the element. Properties used: #attributes, #children, #collapsed, #collapsible, #description, #id, #title, #value.
Return value
A themed HTML string representing the group of items.
Related topics
Code
includes/form.inc, line 1759
<?php
function theme_fieldset($variables) {
$element = $variables['element'];
$output = '<fieldset' . drupal_attributes($element['#attributes']) . '>';
if (!empty($element['#title'])) {
$output .= '<legend>' . $element['#title'] . '</legend>';
}
if (!empty($element['#description'])) {
$output .= '<div class="fieldset-description">' . $element['#description'] . '</div>';
}
$output .= $element['#children'];
if (isset($element['#value'])) {
$output .= $element['#value'];
}
$output .= "</fieldset>\n";
return $output;
}
?>Login or register to post comments 