I made an form in HTML and the autofill feature on Chrome successfully fills in the street address, city, and zip. If I leave the "state" input with type="text"
, then it gets autofilled successfully as well. However, if I use a select/option
dropdown list, then it does not get autofilled.
For the options, I tried using state abbreviations for the value like:
<label>
<select>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<select>
State
</label>
and I tried using the state name for the value:
<option value="Alabama">Alabama</option>
<option value="Alaska">Alaska</option>
And neither one works.
Is there a way to get Google Chrome's autofill to automatically select a state from a dropdown list when it is auto-filling the address?
Notes:
- I'm interested in getting it to work for any other browsers/extensions that auto fill addresses for users, but I've only tested in Chrome.
- a javascript solution would be acceptable, but it's not what I'm wanting. But, no jquery.