0

I'm using version 34 of google chrome to test a html form I made. Chrome (and other browsers) have the somewhat friendly ability to remember certain previously entered usernames and passwords. On a later visit to that site, your name and password will be automatically filled in in the correct fields.

Now I have a problem with one of my inputs in my form. It's formatted just like all the others, and its label/and id says "telephone number":

<label class="inputLabel" for="accountTelephoneNumber">Telephone</label>                            
<input type="text" id="accountTelephoneNumber" class="inputFieldText"/>

For some reason, google chrome fills in my username in this field! (My website has a separate page which does in fact have a username input field) I'm not sure what makes my telephone field so special that he automaticlly populates that field.

I can remove this behaviour by clearing my cache, but obviously this does not solve the problem. How can you tell a browser that an input field should NOT be populated with anything?

For reference, here's the input on my login page:

    <form>
    ...
        <input type="text" name="userName" placeholder="username"/>             
        <input type="password" name="password" placeholder="password"/>                                         
        <button class="submitButton" type="submit"><s:text name="login_button_label"/></button>
    </form>
user1884155
  • 3,616
  • 4
  • 55
  • 108

1 Answers1

1

is the box yellow when the username is filled in? if so try this link Disabling Chrome Autofill

Community
  • 1
  • 1
AgeDeO
  • 3,137
  • 2
  • 25
  • 57
  • Yes, my box was yellow. The only real answer at this moment is adding 2 additional fields to your form, one of type password, and then hiding them with css. – user1884155 Aug 12 '14 at 16:36