fishera
fishera

Reputation: 799

how to remove password suggestion Chrome

When I am trying to change password in Chrome, there is always a dropdown list with "Use password for:" options. Is it possible to remove it? I have tried autocomplete="off" and autocomplete="false" but without success.

enter image description here

Upvotes: 15

Views: 16766

Answers (4)

vignesh
vignesh

Reputation: 39

You can change the password to text and onclick function to again change as password

<input type="text" class="form-control" id="old_password" required onclick="$(this).attr('type', 'password');">

Upvotes: -1

Hassan Khademi
Hassan Khademi

Reputation: 1390

I had the same problem it seems difficult to solve I found a solution To solve the problem,
the input in initialization must be equal to type="text" and then change to type="password" with the first focus or insert input

function changeTypeInput(inputElement){ 
  inputElement.type="password" 
}
<input type="text"
  id="anyUniqueId"  
  onfocus="changeTypeInput(this)"
  oninput="changeTypeInput(this)"
/>

Upvotes: 3

Sebas
Sebas

Reputation: 21522

According to the spec, if you expect a new password to be filled in (which is why you would not expect auto-completion for example), you should rather specify autocomplete="new-password" for the input field.

This instruction is recognized by chrome.

Upvotes: 4

gerard
gerard

Reputation: 184

They reported this as a bug in the Chromium project, but seems Google never actually looked at it or fixed it.

A workaround would be to change the name of the field.

You can also add invisible input fields, a demo could be found here.

Upvotes: 2

Related Questions