Karl Peterson
Karl Peterson

Reputation: 151

How can I activate the Google Chrome password generator for my password input field?

I have noticed on some websites google is asking me if i want to use a password generated by Chrome.

It doesnt happen with my own input field.

How can i make this work?

EXAMPLE

Upvotes: 15

Views: 9818

Answers (1)

SvennD
SvennD

Reputation: 429

Based on chromium; this should work : (the suggest password comes after already known passwords for that site)

<form id="login" action="signup.php" method="post">
  <input type="text" autocomplete="username">
  <input type="password" autocomplete="new-password">
  <input type="password" autocomplete="new-password">
  <input type="submit" value="Sign Up!">
</form>

more examples : https://www.chromium.org/developers/design-documents/form-styles-that-chromium-understands

Upvotes: 13

Related Questions