May 18, 2021 WeChat Mini Program Development Document
Access to WeChat city services, business parties can use the small program auto-fill component function, access to the user for the first time filled out the form information. To access the auto-fill component, click here for detailed instructions.
The auto-fill field consists of two parts, (group.key) for grouping and specific fields, the same group of fields can be associated, the user's single selection can complete all the filling. In addition, when developing, you need to specify autofill fields for input, textarea, picker.
Field definitions and specific group and key fields can be found in the table below. (When applying for permissions, you can select the group_key, or key)
group_key | key | The field definition |
The public field
(Can be combined group_key any device) |
name | Name |
id_card_num | ID number | |
phone | Mobile phone number | |
Mailbox | ||
Basic information
base_info |
sex | Gender |
birthday | Birthday | |
nationality | Nationality | |
Driver's license information
driver_licence_info |
licence_num | Driver's license number |
licence_file_num | Driver's license file number | |
Travel permit information
driver_licence_info |
licence_plate_num | Driving license plate number |
engine_num | Driver's license engine number | |
licence_hassis_num | The driving license frame number | |
Address
address_info |
nationality | Countries |
address | Province | |
address_detail | Detailed address | |
postcode | Zip | |
Passport
passport |
passport_num | Passport number |
validity | Passport validity | |
issue_at | The place of issue | |
first_name_zh | Name (Chinese) | |
last_name_zh | Last name (Chinese) | |
first_name_en | Name (English) | |
last_name_en | Last name (English) | |
birth_place | Houjun is born | |
residence_place | Victory location | |
Hong Kong and Macao Pass
hk_macau_passport |
passport_num | Hong Kong and Macao Password |
validity | passport expiry date | |
issue_at | Issued | |
first_name_zh | Name (Chinese) | |
last_name_zh | Last name (Chinese) | |
first_name_en | Name (English) | |
last_name_en | Last name (English) | |
birth_place | Houjun is born | |
residence_place | Victory location | |
Social security card
social_security |
card_num | Social security card number |
When you fill in the form, the public field is used, you need to call the corresponding group, such as: base_info.name, base_info.phone; passport.name, Passport.Phone.Other Group fields are called directly, such as Base_Info.email.
<form bindsubmit="submit">
<input class="weui-input" placeholder="姓名" auto-fill="address_info.name" />
<input class="weui-input" placeholder="手机" auto-fill="address_info.phone" />
<input class="weui-input" placeholder="身份证" auto-fill="address_info.id_card_num" />
<button form-type="submit">submit</button>
</form>
In addition to the above documentation, you can download the following test cases to test the trial.
Click to download the test case