function theme_password

7.x theme_password($variables)
5.x theme_password($element)
6.x theme_password($element)

Returns HTML for a password form element.


$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

25 string references to the theme hook from theme_password()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

ajax_pre_render_element in drupal/includes/
Adds Ajax information about an element to communicate with JavaScript.
authorize_filetransfer_form_submit in drupal/includes/
Form submission handler for authorize_filetransfer_form().
DatabaseConnection_mysql::__construct in drupal/includes/database/mysql/
DatabaseConnection_pgsql::__construct in drupal/includes/database/pgsql/
DatabaseTasks::getFormOptions in drupal/includes/
Return driver specific configuration options.

... See full list


drupal/includes/, line 3980
Functions for form and batch generation and processing.


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