Auto complete chrome with wrong fields as login

0


I have a problem where I have a registration form. When performing the registration the browser asks if it wants to save the user and password, the problem is that it saves a field nothing see as user but the password it writes correctly. My form looks like this:

<form id="form_cadastro" autocomplete="off">
   <div id="passo1">
     <input name="email" id="email" type="email" class="validate" />
   </div>
   <div id="passo2">
     <input name="nome" id="nome" type="text" />
   </div>
   <div id="passo3">
     <input name="endereco" id="endereco" type="text" />
     <input name="complemento" id="complemento" type="text" />
   </div>
   <div id="passo4">
     <input name="senha" id="senha" type="password" />
   </div>
</form>

But by giving submit via $.post JQuery in the form, and redirecting the page the browser is saving (asking to save) the value of the complemento(do endereço) field as a user! So when the user goes to the login screen the Auto complete/Auto Fill of the Browser brings in the field user (that is the email) the value of the field complement:

<form id="form_cadastro" autocomplete="off">
     <input name="email" id="email" type="email" class="validate" /> // Autocomplete vindo o complemento(do endereço)
     <input name="senha" id="senha" type="password" />
</form>

Would you have some way to solve this in a way that does not use too much gambiarra?

    
asked by anonymous 04.08.2017 / 19:30

1 answer

1

In this case, when the browser asks if it wants to save the user and password AND YOU ACCEPT, I do not know why , Chrome assumes that the input immediately above the input password is the input of the user.

Just check these two examples I posted on my server

add-on above password

email above password

And see that my comment, although it seems hilarious, has a foundation.

  

NOTE: The HTML used is the author of the question.

It is clear that you would have to have logged in and password on the examples site and accept to save when Chrome asks.

By test login here accept save and then access the examples

  • NOTE: After logging in and accepting, you can close the redirected page that is part of a response from another post.
  

text translated by google from the post below -> > I just found out that if you have a username and password remembered for a site, the current version of Chrome will automatically populate your username /

More on this issue see here

    
04.08.2017 / 21:19