浏览器(Safari、Opera)中自动填写个人数据使用的表单字段名称

发布于 2024-07-24 10:24:08 字数 1075 浏览 5 评论 0 原文

我正在寻找主要浏览器中的自动填充功能可识别的表单字段名称的完整列表()。

以下是我通过反复试验发现在 Safari 中可以使用的一些方法:

  • email
  • Ecom_ReceiptTo_Postal_Name_First
  • Ecom_ReceiptTo_Postal_Name_Last
  • first-name
  • 名字
  • 姓氏
  • 姓氏
  • 全名
  • 生日
  • 公司
  • 职位
  • 电话
  • 街道
  • 城市
  • 国家
  • code> (用于美国以外的县)
  • postalcode
  • zip

但是,我找不到标题/尊称前缀的单独字段(它仅包含在全名中)。

Opera's Wand 可以识别或多或少相同的名称,但名称除外,这需要 Ecom_ReceiptTo_Postal_Name_FirstEcom_ReceiptTo_Postal_Name_Last

我找不到手机号码字段。 还没有找到获得单独的家庭/工作领域的方法。


有人建议扩展autocomplete属性以允许开发人员明确指定这些属性。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

定格我的天空 2024-07-31 10:24:08

根据 http://www.macosxhints.com/article.php?story=20070527063904285 Safari.app 包中的文件 Contents/Resources/English.lproj/ABAutoCompleteMappings.plist 引导此列表:

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

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
擦肩而过的背影 2024-07-31 10:24:08

为此有一个 RFC。 但显然一些实现搜索标签而不是使用字段名称。

您是否尝试过 Ecom_ShipTo_Postal_Name_PrefixEcom_BillTo_Postal_Name_PrefixEcom_ReceiptTo_Postal_Name_Prefix 作为标题?

RFC 中描述的多个电话号码似乎没有任何选项。 只需 Ecom_ReceiptTo_Telecom_Phone_Number

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

养猫人 2024-07-31 10:24:08

这可能是一个愚蠢的建议*,但是您是否考虑过获取源代码并四处探索? Webkit 在这里Firefox 就在这里(有点)。 但它对 Opera 或 IE 没有帮助。

* 这对我来说很愚蠢,c/c++ 对我来说都是双重的:-)

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 :-)

ヤ经典坏疍 2024-07-31 10:24:08

以下是完整的属性列表,其中包含更详细的说明

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

有效属性为:

  • name
  • Honorific-prefix
  • Give-Name
  • Extra-Name
  • Family-Name
  • Honorific-Suffix
  • Nickel
  • username
  • New-Password
  • 当前密码
  • 一次性代码
  • 组织名称
  • 组织
  • 街道地址 地址
  • 行 1
  • 地址行 2
  • 地址行
  • 3
  • 地址级别 4
  • 地址级别 3 地址级别 2
  • 地址级别 1
  • 国家
  • 国家名称
  • 邮政编码 抄送
  • 名称
  • 抄送-给定-名称
  • cc-附加名称
  • cc-家族名称
  • cc-号码
  • cc-exp
  • cc-exp-月
  • cc-exp-年
  • cc-csc
  • cc 类型
  • 交易货币
  • 交易金额
  • 语言
  • bday
  • bday-day
  • bday-month
  • bday-year
  • 性别
  • 网址 照片
  • 电话
  • 电话
  • 国家代码
  • 电话国家
  • 代码 电话地区代码
  • 电话本地
  • 电话本地前缀
  • 电话本地后缀
  • 电话分机
  • 电子邮件
  • impp

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文