0

I have a Sign Up form which contains these input fields (in order):

  • e-mail (autocomplete="email", type="email")
  • (user)name (type="text")
  • (display)name (type="text")
  • password (autocomplete="new-password",type="password")
  • password again (type="password")

If the user submits this form, Chrome suggests to save the password but paired with the name(s) instead of the e-mail field (which will be needed to login). How can I tell Google Chrome (and other browsers) which input fields to remember / which will be the login credentials? (in my case: e-mail and password). Is there some kind of HTML5 code for this?

I have tried so far:

  • autocomplete="false" , autocomplete="off" and autocomplete="new-password" on the name fields ( Not working)
  • autocomplete="false", autocomplete="off" on the signup form itself (not working)
  • give an unrecognizable id and name to the name fields (id="usnm" instead of id="username") (not working)

I need to achieve:

  • Tell the browser that DO NOT remember the sign up form input values as credentials OR
  • Tell the browser exactly which data values to remember (e-mail + pass)

Any help is much appreciated!

  • This is coding problem, please post it in correct section – Omkar Chogale Sep 4 '19 at 17:56
  • 1
    Why is the user submitting a username if it's not used to log in? – Stacy H Sep 4 '19 at 18:29
  • Thank you for pointing out that this is not the right forum, but unfortunately, no one could help me at the coding forum so this is why I posted this here ( I thought as a UI/UX developer this problem may come through once in a while in some form so it worth a shot). Sorry for the inconvenience – Catso Sep 13 '19 at 13:01
1

In the HTML, label the email field "username", both name and ID attributes. Use "Email" as the label that the user sees. They will be setting a login that is an email.

Don't capture a separate username, as that might be confusing ("Which do I log in with?") Use Display Name as a handle that will be used throughout the site.

| improve this answer | |
  • Thank you Stacy, your solution saved my life! (It worked like a charm!) Ps: I need usernames because I use them as user ID's (in URLs mainly) instead of the real (numeric) ones. I thought users will appreciate the opportunity to choose one for themselves instead some random numbers and letters - but maybe this wasn't the best idea. – Catso Sep 13 '19 at 13:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.