How to stop the browser from asking to save email and password in the registration form?

I am creating a registration form in PHP. Each time I press the registration button, the browser asks to save the email and password. How can i stop this?

+5
source share
4 answers

As of April 2016, this is browser-level behavior and user responsibility for control.

Two things you can do are:

  • You can tell the user how to prevent this message from appearing, and

  • File a complaint with the devleopment development team to encourage them to change their behavior. If enough people want to change it, it will be changed.

+2
source

You can use autocomplete = "off" for input fields like

<input type="text" name="Username" autocomplete="off"> <input type="password" name="Password" autocomplete="off"> 

or in the form tag. May not work in all browsers.

See http://caniuse.com/#search=autocomplete in supported browsers.

0
source

This code solves my problem. I just added

readonly onfocus = "this.removeAttribute ('readonly');"

Besides

autofill = "off"

And the input should look like this

 <input type="text" name="UserName" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');" > <input type="password" name="Password" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');" > 
0
source

Add autocomplete = "off" attribute in form tag

-----
-2
source

Source: https://habr.com/ru/post/1246927/


All Articles