Chrome auto-fill & autocomplete=on not working

Viewed 5701

I can find a lot of references even on StackOverflow that Chrome Auto-fill functionality should work if autocomplete="on".

However that does not seem to be the case with the latest Chrome I have here (60.0.3112.90). To be precise - default browser autocomplete works fine , but Auto-fill will ignore the field completely.

The code below won't work with Chrome Auto-fill:

<form method="post" name="checkout" url="/">
    <input type="text" name="given-name" autocomplete="on"   />
    <input type="text" name="email"  autocomplete="on"  />
</form>

However, this will work without issues:

<form method="post" name="checkout" url="/">
    <input type="text" name="given-name" autocomplete="given-name"   />
    <input type="text" name="email"  autocomplete="email"  />
</form>

You can easily test it here: https://jsfiddle.net/kw4yjpz4/

Screenshots: Auto-Fill when autocomplete="on" Auto-Fill when autocomplete="given-name"

Does it mean that all input fields now have to have autocomplete="[NAME]" for auto-fill to work? Is this a bug in the newest Chrome or intended behaviour?

3 Answers

I stumbled across this same issue and searching led me here... I moved on not finding an answer and finally stumbled across the answer to my cause of the issue, so I came back in case someone like me wanders through with the same issue (likely myself in 2 years when I've forgotten about it - hi, me!).

Turns out if the site does not have a valid SSL cert, Chrome Autofill does not work.

Try the following:

<!DOCTYPE html>
<html>
<body>

<h2>The autocomplete Attribute</h2>

<form action="/action_page.php" autocomplete="on">
  First name:<input type="text" name="fname"><br>
  Last name: <input type="text" name="lname"><br>
  E-mail: <input type="email" name="email" autocomplete="off"><br>
  <input type="submit">
</form>

<p>Fill in and submit the form, then reload the page to see how autocomplete works.</p>
<p>Notice that autocomplete is "on" for the form, but "off" for the e-mail field.</p>

</body>
</html>

The above works as I want in Chrome when the site has a valid SSL cert. Saving locally and opening the .html results in Autofill not working.

Related