Form field names used by personal data auto-fill in browsers (Safari, Opera)
Asked Answered
Z

4

41

I'm looking for complete list of form field names (<input name="…">) that are recognized by auto-fill functions in major browsers.

Here are some I've found to work in Safari using trial-and-error:

  • email
  • Ecom_ReceiptTo_Postal_Name_First
  • Ecom_ReceiptTo_Postal_Name_Last
  • first-name
  • firstname
  • last-name
  • lastname
  • full-name
  • birthday
  • company
  • jobtitle
  • phone
  • street
  • city
  • country
  • state (used for county outside US)
  • postalcode
  • zip

However I couldn't find separate field for title/honorific prefix (it's included in full name only).

Opera's Wand recognizes more or less the same names with exception of name, which requires Ecom_ReceiptTo_Postal_Name_First and Ecom_ReceiptTo_Postal_Name_Last.

I couldn't find field for mobile phone number. Haven't found way to get separate home/work fields.


There's proposal to extend autocomplete attribute to allow developers specify these explicitly.

Zebada answered 22/6, 2009 at 14:15 Comment(0)
D
29

According to http://www.macosxhints.com/article.php?story=20070527063904285 the file Contents/Resources/English.lproj/ABAutoCompleteMappings.plist within the Safari.app package leads this list:

first
first name
fname
firstname
given name

middle initial
middleinitial
middle name
middlename
middle

last
last name
lname
lastname
surname

name

birthday
date of birth
born

job title
jobtitle

email
e-mail

street
street address
streetaddress
address1
address 1

address

city

state

zip
zipcode
zip code
postalcode
postal code

country

homephone
home phone
eveningphone
evening phone
home area code
home areacode
homeareacode
evening area code
evening areacode
eveningareacode

workphone
work phone
dayphone
day phone
daytime phone
companyphone
company phone
businessphone
business phone
work area code
work areacode
workareacode
day area code
day areacode
dayareacode
company area code
company areacode
companyareacode
business area code
business areacode
businessareacode

mobilephone
mobile phone
cellphone
cell phone
mobile area code
mobile areacode
mobileareacode
cell area code
cell areacode
cellareacode

pagerphone
pager phone
pager area code
pager areacode
pagerareacode

area code
areacode

phone

fax

organization
company
Deign answered 28/8, 2009 at 18:20 Comment(1)
In Safari 10.1 the file is no longer located at the location described above. I have not been able to locate the equivalent elsewhere.Disconnected
F
2

There is a RFC for this. But apparently some implementations search for labels rather than using field names.

Did you try Ecom_ShipTo_Postal_Name_Prefix, Ecom_BillTo_Postal_Name_Prefix or Ecom_ReceiptTo_Postal_Name_Prefix for the title?

There doesn't seem to be any option for multiple phone numbers described in the RFC. Just Ecom_ReceiptTo_Telecom_Phone_Number etc

Flyfish answered 22/6, 2009 at 14:31 Comment(1)
I've tried these (all from the Ecom RFC), but Safari incorrectly puts full name in them.Zebada
M
0

This might be a silly suggestion*, but have you considered getting the source and poking around? Webkit is here, Firefox is here (kinda). It won't help with Opera or IE though.

* It'd be silly for me, c/c++ is all double duch to me :-)

Malvasia answered 28/6, 2009 at 9:37 Comment(0)
W
0

Here is the full list of attributes with a more detailed explanation

https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill

Valid attributes are:

  • name
  • honorific-prefix
  • given-name
  • additional-name
  • family-name
  • honorific-suffix
  • nickname
  • username
  • new-password
  • current-password
  • one-time-code
  • organization-title
  • organization
  • street-address
  • address-line1
  • address-line2
  • address-line3
  • address-level4
  • address-level3
  • address-level2
  • address-level1
  • country
  • country-name
  • postal-code
  • cc-name
  • cc-given-name
  • cc-additional-name
  • cc-family-name
  • cc-number
  • cc-exp
  • cc-exp-month
  • cc-exp-year
  • cc-csc
  • cc-type
  • transaction-currency
  • transaction-amount
  • language
  • bday
  • bday-day
  • bday-month
  • bday-year
  • sex
  • url
  • photo
  • tel
  • tel-country-code
  • tel-national
  • tel-area-code
  • tel-local
  • tel-local-prefix
  • tel-local-suffix
  • tel-extension
  • email
  • impp
Windham answered 12/5, 2021 at 7:54 Comment(3)
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From ReviewHughmanick
@Hughmanick I've updated the answer with the full list extracted from the link.Windham
family-name does not work for last name in iOSCrowded

© 2022 - 2024 — McMap. All rights reserved.