form_group

Definition

form_group($legend, $group, $description = NULL)
drupal/includes/common.inc, line 1070

Description

Format a group of form items.

Parameters

$legend The label for the form item group.

$group The form items within the group, as an HTML string.

$description Explanatory text to display after the form item group.

Return value

A themed HTML string representing the form item group.

Related topics

Namesort iconDescription
Form generationFunctions to enable output of HTML forms and form elements.
Input validationFunctions to validate user input.

Code

function form_group($legend, $group, $description = NULL) {
  return '<fieldset>' . ($legend ? '<legend>'. check_plain($legend) .'</legend>' : '') . $group . ($description ? '<div class="description">'. $description .'</div>' : '') . "</fieldset>\n";
}