theme_form

  1. drupal
    1. 4.7
    2. 5
    3. 6 form.inc
    4. 7 form.inc
Versions
4.7 – 6 theme_form($element)
7 theme_form($variables)

Format a form.

Parameters

$element An associative array containing the properties of the element. Properties used: action, method, attributes, children

Return value

A themed HTML string representing the form.

Related topics

Code

includes/form.inc, line 1056

<?php
function theme_form($element) {
  // Anonymous div to satisfy XHTML compliance.
  $action = $element['#action'] ? 'action="' . check_url($element['#action']) . '" ' : '';
  return '<form ' . $action . ' method="' . $element['#method'] . '" ' . 'id="' . $element['#id'] . '"' .  drupal_attributes($element['#attributes']) . ">\n<div>" . $element['#children'] . "\n</div></form>\n";
}
?>