4.7.x form.inc theme_password($element)
5.x form.inc theme_password($element)
6.x form.inc theme_password($element)
7.x form.inc theme_password($variables)

Returns HTML for a password form element.


$variables: An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #size, #maxlength, #required, #attributes.

Related topics

1 theme call to theme_password()
system_element_info in modules/system/system.module
Implements hook_element_info().


includes/form.inc, line 4102
Functions for form and batch generation and processing.


function theme_password($variables) {
  $element = $variables['element'];
  $element['#attributes']['type'] = 'password';
  element_set_attributes($element, array(
  _form_set_class($element, array(
  return '<input' . drupal_attributes($element['#attributes']) . ' />';