| Versions | |
|---|---|
| 4.7 – 6 | theme_password( |
| 7 | theme_password($variables) |
Returns HTML for a password form element.
$variables An associative array containing:
drupal/
<?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']) . ' />';
}
?>