You are here

function protected_node_autocomplete_off in Protected Node 6

Same name and namespace in other branches
  1. 7 protected_node.module \protected_node_autocomplete_off()
  2. 1.0.x protected_node.module \protected_node_autocomplete_off()

After_build function to disable autocomplete for the password fields.

Without this FF >= 3 will attempt to autocomplete the fields with the user's login info.

@link http://api.drupal.org/api/file/developer/topics/forms_api_reference.html...

2 string references to 'protected_node_autocomplete_off'
protected_node_node_form_alter in ./protected_node.settings.inc
Actual implementation of the protected_node_form_alter() function.
protected_node_node_type_form_alter in ./protected_node.settings.inc
@brief Implementation of the hook_form_alter() for node types.

File

./protected_node.module, line 791

Code

function protected_node_autocomplete_off($form_element, &$form_state) {
  $form_element['pass1']['#attributes']['autocomplete'] = 'off';
  $form_element['pass2']['#attributes']['autocomplete'] = 'off';
  return $form_element;
}