I've created a web application which uses a tagbox drop down. This works great in all browsers except Chrome browser (Version 21.0.1180.89).
Despite both the input
fields AND the form
field having the autocomplete="off"
attribute, Chrome insists on showing a drop down history of previous entries for the field, which is obliterating the tagbox list.
After having tried all solutions, Here is what seems to be working for chrome version:45, with form having password field :
In Chrome 48+ use this solution:
Put fake fields before real fields:
Hide fake fields:
You did it!
Also this will work for older versions.
The hidden input element trick still appears to work (Chrome 43) to prevent autofill, but one thing to keep in mind is that Chrome will attempt to autofill based on the placeholder tag. You need to match the hidden input element's placeholder to that of the input you're trying to disable.
In my case, I had a field with a placeholder text of 'City or Zip' which I was using with Google Place Autocomplete. It appeared that it was attempting to autofill as if it were part of an address form. The trick didn't work until I put the same placeholder on the hidden element as on the real input:
After the chrome v. 34, setting
autocomplete="off"
at<form>
tag doesn`t workI made the changes to avoid this annoying behavior:
name
and theid
of the password inputpasswordInput
)(So far, Chrome wont put the saved password on the input, but the form is now broken)
Finally, to make the form work, put this code to run when the user click the submit button, or whenever you want to trigger the form submittion:
In my case, I used to hav
id="password" name="password"
in the password input, so I put them back before trigger the submition.You can use
autocomplete="new-password"
Works in:
Change input type attribute to
type="search"
.Google doesn't apply auto-fill to inputs with a type of search.