| Versionen | |
|---|---|
| drupal6 – drupal7 | theme_password($element) |
Format a password field.
$element An associative array containing the properties of the element. Properties used: title, value, description, size, maxlength, required, attributes
A themed HTML string representing the form.
includes/
<?php
function theme_password($element) {
$size = $element['#size'] ? ' size="' . $element['#size'] . '" ' : '';
$maxlength = $element['#maxlength'] ? ' maxlength="' . $element['#maxlength'] . '" ' : '';
_form_set_class($element, array('form-text'));
$output = '<input type="password" name="' . $element['#name'] . '" id="' . $element['#id'] . '" ' . $maxlength . $size . drupal_attributes($element['#attributes']) . ' />';
return theme('form_element', $element, $output);
}
?>
Kommentare
Kommentar hinzufügen