0

I'm trying to make it so the forms on my login/ registration pages won't preload data already entered. I've tried using autocomplete although some research on here tells me that this is ignored by Chrome? So I was wondering how else I can get around this issue?

Code:

<h3>USERNAME:</h3>
<input type='textbox' autocomplete='off' name='usernamereg' value='<?php     echo $_POST['usernamereg'] ?>'>

I want the bottom 2 fields to not have the pre-entered information:

Screenshot

Any help appreciated!

mrdarb
  • 101
  • 10

3 Answers3

0

For some weird reason, Google Chrome seems to ignore autocomplete rules in forms. Google Chrome also seems to only autofill the first occurrence of a username/password field. Try the following for the password field:

<input type="text" style="display:none!important">
<input type="text" autocomplete="null" name="usernamereg" value="<?php echo $_POST['usernamereg'] ?>">

<input type="password" style="display:none!important">
<input type="password" autocomplete="null" name="whatevername" value="<?php echo $yourvariable ?>">
Bradley
  • 129
  • 3
  • 14
0

You have saved username and password in you browser. So It fill fetch from the browser autocomplete. If you clear cache and saved password. It wont come... I face this same issue... After clearing those things. It works fine... Hope it work for you too...

0

write autocomplete="off" in your form tag

<form method="" action="" autocomplete="off" > 
</form>

Hope this will work

Mehul Kuriya
  • 602
  • 5
  • 18