Unwanted data show after add password-comfirm In my form I would like to add comfirm password field, the pic below show is before adding comfirm field, there is no data in waiter name field, after adding comfirm-password field there are data in waiter name field and password field, where do they come from. Anyone could please to help me to solve this problem.

function waiter_form($form, &amp;$form_state= NULL) {

$form['waiter_name'] = array(
'#type' =&gt; 'textfield',
'#title' =&gt; t('Waiter Name'),
'#maxlength' =&gt; 70, 
'#description' =&gt; t("You Need To Add Waiter Name. "),
'#required' =&gt; 'true'
);

$form['pass_fields'] = array(
  '#type' =&gt; 'password_confirm',
  '#description' =&gt; t('Enter the same password in both fields'),
);


$form['actions'] = array('#type' =&gt; 'actions');
$form['actions']['submit'] = array(
'#type' =&gt; 'submit',
'#value' =&gt; t('Save'),
);

return $form;
}


Screen shot of before adding confirm password field



Screen shot of after adding comfirm password field
Your browser autocomplete functionality is responsible for this.

If it's undesirable something like this should fix it:

$form['waiter_name'] = array(
  '#type' =&gt; 'textfield',
  '#title' =&gt; t('Waiter Name'),
  '#maxlength' =&gt; 70, 
  '#description' =&gt; t("You Need To Add Waiter Name. "),
  '#required' =&gt; 'true',
  '#attributes' =&gt; array('autocomplete' =&gt; 'off'),
);


I would expect just adding it to the name field is enough, the browser shouldn't try to fill the password if it doesn't perceive a username.