简体   繁体   中英

Remove Chrome's AutoFill pop-up

When I fill a text input within Chrome (and maybe the same on FireFox and Internet Explorer) I have an AutoFill pop-up that is hiding my AutoComplete AJAX pop-up. See photo below.

包含“ cann”的表单,Chrome自动填充与重叠的AJAX自动填充

I try to add autocomplete="off" but it didn't do anything and I learned that modern browser will not take these into account autocomplete="off" anymore.

How can I forbid Chrome to pop-up this useless AutoFill div that simply hides my AJAX AutoComplete div?

my problem is the autofill popup, not the autocomplete feature ...

The goal is to disable the chrome autocomplete popup when typing in my field named "Town / Zip Code* :", because I need to display my own ajax popup with a cities list.

Here is a working solution, after many hours of search :

<form method="post" action="">
<br/><label for="address">Address :</label><input type="text" id="address" name="address" value="">
<br/><label for="address2"></label><input type="text" id="address2" name="adress2" value="">
<br/><label for="code"><input style="display:none" />Town / Zip Code* :</label><input type="text" id="code" name="code" autocomplete="off" value="">
<div style="display:none"><br/><label for="city"></label><input type="hidden" id="city" name="city" value="0"></div>
<br/><label for="country">Country</label><select id="country" name="country"><option>France</option></select>
<br/><input type="submit" name="valider" value="ok">
</form>

Explanation : Chrome is parsing field names, field values, and labels preceding fields. If he detects that a word of "Adresses/Cities/Zipcodes" lexical field matches with your form, he enables the autocomplete and autofill popup for all the fields...

So I've renamed the input field and label with "code" instead of "zipcode", I've added " <input style="display:none" /> " before the zipcode label text, and it worked ! There is other solutions like removing labels, change input name/id, add <td> tags.

Hope it will help !

Simple. To turn off Chrome's Autofill, go to Settings->Click on "Show Advanced Settings"->Find the Passwords and Forms section->Un-check the "Enable AutoFill to fill out web forms in a single click." checkbox.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM