theme_password

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

Returns HTML for a password form element.

Parameters

$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

Code

drupal/includes/form.inc, line 3724

<?php
function theme_password($variables) {
  $element = $variables['element'];
  $element['#attributes']['type'] = 'password';
  element_set_attributes($element, array('id', 'name', 'size', 'maxlength'));
  _form_set_class($element, array('form-text'));

  return '<input' . drupal_attributes($element['#attributes']) . ' />';
}
?>