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 !