In some forms, Chrome autofill prompts with Credit card autofill.
EDIT:Adding screenshot. This is not the same as browser autocomplete. You need not have entered the
This question is pretty old but I have an updated answer for 2019!
You can now tell your browser which fields are for credit card info just by naming the correctly.
The following answer is from my original answer from here: https://stackoverflow.com/a/41965106/1696153
Here's a link to the official current WHATWG HTML Standard for enabling autocomplete.
Google wrote a pretty nice guide for developing web applications that are friendly for mobile devices. They have a section on how to name the inputs on forms to easily use auto-fill. Eventhough it's written for mobile, this applies for both desktop and mobile!
Here are some key points on how to enable autocomplete:
for all your fieldsautocomplete attribute to your tags and fill it in using this guide.name and autocomplete attributes correctly for all tagsExample:
tagsIn order to trigger autocomplete, make sure you correctly name the name and autocomplete attributes in your tags. This will automatically allow for autocomplete on forms. Make sure also to have a ! This information can also be found here.
Here's how to name your inputs:
name: name fname mname lnameautocomplete:
name (for full name)given-name (for first name)additional-name (for middle name)family-name (for last name)name: emailautocomplete: emailname: address city region province state zip zip2 postal country autocomplete:
street-addressaddress-line1address-line2address-level1 (state or province)address-level2 (city)postal-code (zip code)countryname: phone mobile country-code area-code exchange suffix extautocomplete: telname: ccname cardnumber cvc ccmonth ccyear exp-date card-typeautocomplete:
cc-namecc-numbercc-csccc-exp-monthcc-exp-yearcc-expcc-typename: usernameautocomplete: usernamename: passwordautocomplete:
current-password (for sign-in forms)new-password (for sign-up and password-change forms)