1
0

inputのnameの設定早見表

Last updated at Posted at 2024-08-06
姓名 name
family-name
given-name
メールアドレス email
会社名 organization
電話番号 tel
郵便番号 postal-code
都道府県 address-level1
市区町村 address-level2
番地・マンション名(1行目) address-line1
番地・マンション名(2行目) address-line2 
生年月日 bday
生年月日(日) bday-day
生年月日(月) bday-month
生年月日(年) bday-year
性別 sex
ユーザーネーム username
現在のパスワード current-password
新パスワード new-password
クレジットカードナンバー cc-number
クレジット名前 cc-name
クレジットセキュリティコード cc-csc
クレジットセキュリティコード cc-csc
クレジット有効期限(月) cc-exp-month
クレジット有効期限(年) cc-exp-year

都道府県はselect要素だと、自動入力が効かないため、input要素にするのことを推奨
生年月日の自動入力はSafariのみ有効。Chromeは未対応
カナ表記に関してルールは特に決まっておりません

autocompleteを設定する

<input type="text" name="postal-code" autocomplete="postal-code" />

参考文献

https://ics.media/entry/11221/
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0