harryg
harryg

Reputation: 24077

How to get rid of autofill in a form on locally developed page

I'm building a site locally and in one form I have a phone number input and a password input. Chrome is pre-filling these fields, the phone number with my email address, and the password field with a password as shown.

enter image description here

This is a registration page so I don't want the password field pre-filled and the phone number should not contain an email address.

This is the markup of these inputs:

<input type="tel" value="" id="phone" name="phone" class="input ">

<input type="password" placeholder="Min 10 characters" id="password" name="password" class="input ">

Things I have tried to disable chrome autocomplete, all of which have had no effect:

The only thing that prevents chrome autocompleting the input is to add another phone input before and style it as hidden, which is a horrible hack I want to avoid.

What is the cause of chrome inserting an email address into a tel input with name phone? How can I prevent this behaviour?

I'm not worried about completely disabling autocomplete but I don't want it inserting email addresses into phone-number inputs.

Upvotes: 0

Views: 117

Answers (1)

Subash Matheswaran
Subash Matheswaran

Reputation: 215

  1. Open Chrome.
  2. At the top right, click Settings.
  3. At the bottom, click Show advanced settings.
  4. Under "Passwords and forms," click Manage Autofill settings.
  5. Point to the entry (in your case: phone-number inputs) and click Delete Close.

Note: email addresses has been filled in the phone number input field instead of phone number.

Upvotes: 1

Related Questions