function theme_password
Same name and namespace in other branches
- 6.x drupal-6.x/includes/form.inc \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
Archivo
- drupal-7.x/
includes/ form.inc, line 3911 - Functions for form and batch generation and processing.
Código
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']) . ' />';
}