1. 4.6.x includes/common.inc form
  2. 4.7.x includes/form.inc form
  3. 5.x includes/form.inc form

Functions to enable output of HTML forms and form elements.

Drupal uses these functions to achieve consistency in its form presentation, while at the same time simplifying code and reducing the amount of HTML that must be explicitly generated by modules.

Parent topics

File

includes/common.inc, line 968
Common functions that many Drupal modules will need to reference.

Functions

Namesort descending Location Description
form includes/common.inc Generate a form from a set of form elements.
form_button includes/common.inc Format an action button.
form_checkbox includes/common.inc Format a checkbox.
form_checkboxes includes/common.inc Format a set of checkboxes.
form_file includes/common.inc Format a file upload field.
form_get_errors includes/common.inc Return an associative array of all errors.
form_group includes/common.inc Format a group of form items.
form_hidden includes/common.inc Store data in a hidden form field.
form_item includes/common.inc Format a general form item.
form_password includes/common.inc Format a single-line text field that does not display its contents visibly.
form_radio includes/common.inc Format a radio button.
form_radios includes/common.inc Format a set of radio buttons.
form_select includes/common.inc Format a dropdown menu or scrolling selection box.
form_set_error includes/common.inc File an error against the form element with the specified name.
form_submit includes/common.inc Format a form submit button.
form_textarea includes/common.inc Format a multiple-line text field.
form_textfield includes/common.inc Format a single-line text field.
form_token includes/common.inc Generate a form token based on the session and the private key to defend against cross site request forgeries.
form_weight includes/common.inc Format a weight selection menu.
_form_get_class includes/common.inc
_form_get_error includes/common.inc Return the error message filed against the form with the specified name.