function theme_password

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

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

File

includes/form.inc, line 4146

Code

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']) . ' />';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.