[英]Chrome auto-fill are filling the wrong text inputs
I am coding a php website.我正在编写一个 php 网站。 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.这是我的意思的图像。
<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"我还将表单设置为 autocomplete="off"
You got to use autocomplete="false"
instead of "off".你必须使用autocomplete="false"
而不是 "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"/>
check my answer here.在这里检查我的答案。 https://stackoverflow.com/a/62943913/12332625 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.我认为您的问题是您在一行中有 2 个输入字段。 <label for="email">Your email</label>
etc. should fix your problem. <label for="email">Your email</label>
等应该可以解决您的问题。
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="">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.