0

I am coding a php website. My issue is really on the profile page. The auto-fill is putting my email address where I have an input for the street address. Here is an image of what I mean.

Auto-Fill Image

 <input type="text" name="txtstreetaddress" id="txtstreetaddress" placeholder="Street Address" tabindex="6" value="<?php echo $address ?>" style="font-family: 'Ubuntu';margin-top: -30px;font-size: 14px;height: 30px;width: 280px;" autocomplete="off" value="">

I also have the Form set to autocomplete="off"

Retro617
  • 13
  • 1
  • 7

2 Answers2

0

You got to use autocomplete="false" instead of "off".

If this still does not work (what i don't expect) you can handle it by putting two fake-fields at the beginning of your form like the following ones:

<input style="display:none" type="text" name="fakeusernameremembered"/>
<input style="display:none" type="password" name="fakepasswordremembered"/>
Simon Kraus
  • 736
  • 4
  • 14
  • According to https://www.w3.org/wiki/HTML/Elements/input/text it's `autocomplete = on/ off/ default` – brombeer Oct 17 '17 at 20:56
  • Double-Checked: You're right! Did some further investigation on the Question: It's not about autocomplete. What happened on the picture above is chromes autofill, which is not affected by autocomplete="off". the fake fields seem to be the only workaround at the moment. – Simon Kraus Oct 18 '17 at 16:40
  • 2
    Fake-fields do not work since Chrome does not autofill hidden fields – sglessard Mar 14 '18 at 15:27
  • Hiding the fields doesn't work anymore. You need to hide them without actually hiding them, so do something like this: `
    `
    – Gavin Apr 07 '21 at 14:26
-2

check my answer here. https://stackoverflow.com/a/62943913/12332625

Use labels for the input fields. I think your problem is that you have 2 input fields on one line. <label for="email">Your email</label> etc. should fix your problem.

Like this:

<label for="txtstreetaddress">Street Address:</label> <input type="text" name="txtstreetaddress" id="txtstreetaddress" placeholder="Street Address" tabindex="6" value="<?php echo $address ?>" style="font-family: 'Ubuntu';margin-top: -30px;font-size: 14px;height: 30px;width: 280px;" autocomplete="off" value="">
Jan
  • 21
  • 2