0

I'm just testing with a simple log-in page. Here are 3 text-forms. Username, EmailAddress, Password. When I put the value in there, hit the submit,and auto-complete works for only 2 of them. And the form (EmailAddress) is not filled at all. I just couldn't figure out why auto-complete is not working at EmailAddress.

<!DOCTYPE html>
<html>
    <head>
        <title>Log in Page</title>
    </head>

    <body>
        <form action="login.php" method='post'>
        <p><strong>Login Page </strong></p>
        <p>Username:<input name="username" type="text" ></p>
        <p>EmailAddress:<input name="email" type="text" ></p>
        <p>Password:<input name="password" type="password""></p>
        <p><input type="submit" name="Submit" value="Login"></p>
        </form>
    </body>

</html>

enter image description here

Toshi
  • 6,012
  • 8
  • 35
  • 58
  • http://stackoverflow.com/questions/22636673/safari-saved-passwords-are-overriding-autocomplete-off-in-forms – sinisake Jun 22 '14 at 04:49
  • Do YOU want to autocomplete or are you complaining about it not being blocked? If you have added autocomplete - for example with jQuery/Ajax, show us the code – mplungjan Jun 22 '14 at 04:53
  • @mplungjan: I simply want to have auto-complete work for all the forms or blocked completely. And I don't use jQuery/Ajax here. – Toshi Jun 22 '14 at 05:10

1 Answers1

2

Try setting the autocomplete value. It should default to on, but I'd try adding it. It's also possible your browser has already recorded the data for the autocomplete (as it seems by the image at least), which could mean the browser no longer tries to find anything. Try renaming all the fields and the form (just to test it out, of course) and see if your browser inquires you to save the form data upon submission.

<!DOCTYPE html>
<html>
    <head>
        <title>Log in Page</title>
    </head>

    <body>
        <form action="login.php" method='post'>
        <p><strong>Login Page </strong></p>
        <p>Username:<input name="username" type="text" ></p>
        <p>EmailAddress:<input name="email" type="text" autocomplete="on"></p>
        <p>Password:<input name="password" type="password""></p>
        <p><input type="submit" name="Submit" value="Login"></p>
        </form>
    </body>

</html>
CmdrSharp
  • 1,085
  • 13
  • 30
  • thanks, you are right. the browser has recorded the data already(because I tested out things.), and I couldn't get rid of them out of the form. And I didn't really know once the browser got the data, it turns yellow. Now i got idea. – Toshi Jun 22 '14 at 05:53