theme_password

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

*

Parameters

$element

  • An associative array containing the properties of the element.
  • Properties used: title, value, description, size, maxlength, required, attributes
  • @return
  • A themed HTML string representing the form.

Related topics

Code

includes/form.inc, line 1108

<?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['#title'], $output, $element['#description'], $element['#id'], $element['#required'], form_get_error($element));
}
?>