How can our site hint to 1Password which field to save as "username"?
(I couldn't find an answer to this by searching, but sorry if I've missed something!)
A website that I work on has a registration form that asks for both username and email address; however for logging in again you need to provide the email address and password. What 1Password X does is to save the username field from registration as the username in 1Password - this is completely reasonable, but happens to be the wrong thing to do for our site, since the email address isn't saved in 1Password at all and on trying to fill the login form subsequently, it'll fill the email field with the username instead.
Are there any hints we can include in our registration page (e.g. a special data- attribute?) to indicate to 1Password that the email field is the one that should be saved as the username?
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided
Comments
-
Hi @mhl20,
We don't have 1Password specific hints but I with a couple of what I hope are minor adjustments I was able to coax the right behaviour out of 1Password 7.2.
The first thing I did was add the autocomplete attribute to the email input field and set it to the username value,
autocomplete="username"
. That wasn't enough as 1Password sees the word username connected to the username field in multiple places and it really wants to use it. If I change the name attribute of the username field to almost anything e.g.uname
,alias
then that combined with the autocomplete attribute is enough to get 1Password to save the email address as the username.How would you feel about those changes? I'm figuring the autocomplete attribute is a good one as it helps other tools as well so probably worth adding to the password field too. The change to the name attribute is where I'm not sure if that's a simple change with no other impact or if that creates a ripple of work.
0 -
Hi @littlebobbytables - I just wanted to add a belated "thank-you!" for that advice. I made those changes to our site (both adding
autocomplete="username"
to the email field and changing thename
attribute of the username field fromusername
touname
), and 1Password is now saving the email address as the username and so it's working much more smoothly for me \o/0 -
Hey @mhl20, I'm glad @littlebobbytables was able to help you out. :smile: Cheers!
0