Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
537 views
in Technique[技术] by (71.8m points)

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

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...