1

There are certain internal sites where Chrome will not offer to save the credentials. I have entered them into the Autofill section, but it will still not use them.

This example is for my Unify Router, I have removed the class attribute to make it clearer to see. Looking at the two elements below, I can't see why it does not work, any ideas?

<input name="username" meta="[object Object]" autocapitalize="off" autocorrect="off" 
autocomplete="username" required="" id="login-username" type="" value="">

<input name="password" meta="[object Object]" autocomplete="current-password" id="login-password" 
type="password" value="">

This is from one of my own pages, which does work

<input  type="text" name="username" placeholder="Username" id="username" autocomplete="username">

<input type="password" name="password" placeholder="Password" id="password" autocomplete="current-password">

Questions

  • What can I do to make them work?
  • I can see that type is not specified for username, could this be the problem ?
1
  • I have this exact issue with one-and-only-one site out of 100s that I use. It is quite frustrating because it is a seldom used site and I can't seem to remember what user name it expects. It is unfortunate there is seemingly no work-around. Feb 2 at 19:06

1 Answer 1

0

Password managers will better detect forms when :

  • The <form> element has an action and a method attribute

  • Input elements are associated with a label through their ID (with for) or by being wrapped in one

  • Using the right input type. For username/email : type="text" or type="email". For password : type="password".

  • Autocomplete attribute. For usernames : autocomplete="username", For passwords : autocomplete="new-password" or autocomplete="current-password".

Reference : Making password managers play ball with your login form.

3
  • It's not my code, it's the interface to the unify router. So, I can't just change the code. They are both wrapped in forms. So, as I suspected, the type='' in the username is the culprit. Feb 6, 2023 at 22:26
  • I agree - that's the only missing piece. If you can't correct the code, there's not much you can do.
    – harrymc
    Feb 7, 2023 at 9:07
  • I hoped to use Chrome's developer tools (F12) to correct the referenced element attributes. However, in my case, they are all correct. In my case, it's the 'form' element and action method that are missing. I 'injected' my own empty form element but that didn't work (Chrome still did not offer to save password). I am too busy. I'll have to make a run at this again another day. Feb 2 at 19:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .