Why is a text field automatically filled in by Chrome without being prompted (and Hidden to boot?)

Asked

Viewed 36 times

0

I use version 68.0.3440.106 (Official version) 64 bits, but the complaint below come from several users. I have no way to check the versions of all.

I use the same system, created by me, since last year. Only this year happened the problem below - and only with Chrome.

Basic design of the index:

A same form, Hidden by default, with three fieldsets, each with different fields, but directing to the same data conference page, via ajax. Single Submit button.

On index, menu with three options:

  1. Candidate with CPF -> display the form -> display in the fieldset with text field with name and id "Cpf", Cpfbr mask (jQuery);

  2. Candidate without CPF (passport or foreign registration) -> display the form -> display the fieldset with text field with name and id "pass", without mask;

  3. Candidate already registered -> display the form -> display the fieldset with fields login (id and name "login_sel") and password (id and name "password_sel"), to differentiate from login and password "normal" site (on another page, say in passing);

As I said before, the Submit button is displayed on all three commands, in own fieldset.

The only problem is in option "3". Follows below the example of the console when someone already registered fills login and password:

    cpf: 
    pass: Carlos
    login_sel: emaildosinscrito@qualquer
    senha_sel: jiu-z9V-fMb
    email_sel: 

As I described above, in option 3, the fields "Cpf" and "pass" are Hidden and empty by default. It works perfectly well on all browsers - including IE and Edge (who would say...), except for Chrome, which insists on putting my first name in the "pass" field. And this didn’t happen last year...

I first tried a redundancy by Jquery: by clicking on option 3, hides what is already hidden (fieldsets for Cpf and pass) and still clears the Hidden fields of these fieldsets... equals.

I only got a solution by going to the conference page, telling the code to ignore the "pass" field when login_sel and password_sel are filled.

From now on, Thanks.

  • Have you checked if the form auto-refill option is connected in the browser? I do not know would save the Hidden fields, but it is a test to be done.

  • Have a look at it and see if it works: https://stackoverflow.com/a/30976223/1377664

  • Oi Badaro, whether it’s on or not, the answer is the same. I also took a look, Sam, at the link that you. sent and so I understood one of the ways would be to put the password field before any field and/or create "fake" fields - with several gambiarras. Nothing worked. What puzzles me is why damn Chrome invented (last year did not have this problem) that has to fill with my first login name a field name "pass", Hidden and empty by default, and within a fieldset tb. Hidden. Ok, the field name is "pass", similar to "password". Would that be it? I don’t Believe!

  • On top of my comment above about the problem being the name have "pass", "password": I changed the field name to "ncpf" and.... same thing.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.