Reputation: 14172
I have a problem with the autocomplete option in an input tag.
I will make a form and equip it with autocomplete but the autocomplete will not work.
Consider the following code:
<form autocomplete="on">
<p>Full Name</p><br>
<input type="text" placeholder="Full Name" autocomplete="on"><br><p>Address</p>
<input type="text" placeholder="Address" autocomplete="on"><br>
<p>Email</p><br><input type="email" placeholder="Email"autocomplete="on"><br>
<input type="submit">
</form>
But the auto complete does not work. I have the most updated version of Firefox (27.0.1).
Does Firefox not support autocomplete or am i doing something wrong?
Thanks
Upvotes: 1
Views: 182
Reputation: 436
Add a name attribute for your input fields. Otherwise autocomplete does not allow the browser to predict the value as it can't "re-identify" the field.
<form autocomplete="on">
<p>Full Name</p><br><input name="fname" type="text" placeholder="Full Name"><br>
<p>Address</p><input name="address" type="text" placeholder="Address"><br>
<p>Email</p><br><input name="email" type="email" placeholder="Email" ><br>
<input type="submit">
</form>
By the way: You do not to carry the autocomplete attribute if you have specified it in the <form>
form tag. Only add if you want to turn autocomplete for a specific field off.
Upvotes: 1