# auto-fill
Access to WeChat city services, business can use the Mini Programauto-fill
Component to get information about the form the user filled out for the first time. Access requiredauto-fill
,Click here for details。
# Dxplaination of component invocation
# 1, field description
car-fill
The field consists of two parts,(group.key
)Represents groups and specific fields. Fields of the same group can be associated together, and the user can complete all of the filling in once. In addition, when developing, you need to giveinput
、textarea
、picker
Designationcarfill
Field.
Field definitions and specific group and key fields are shown in the table below. When requesting permission, select the group in this table_Key, or key.)
group_key | key | Field definition |
Basic information base_info | name | Full name |
sex | gender | |
birthday | date of birth | |
id_card_A | ID card number | |
nationality | nationality | |
Telephone information phone_info | phone | Phone number. |
Email Information email_info | E-mail address | |
Address information address_info | address | address |
address_detail | Detailed address | |
Driving License Information driver_licence_info | licence_A | Driving license number |
licence_file_A | Driving Licence File Number | |
Driving license information driving_licence_info | licence_plate_A | License plate number |
engine_A | Driving license engine number | |
licence_hassis_A | Vehicle identification number | |
PASSPORT passport | passport_A | Passport number |
validity | Passport Validity | |
issue_at | Place of issue | |
first_name_zh | Name (Chinese) | |
last_name_zh | Surname (Chinese) | |
first_name_in | Name (English) | |
last_name_in | Family name (English) | |
Exit-Entry Permit for Travelling to and from Hong Kong and Macao hk_macau_passport | passport_A | Hong Kong and Macau Pass No. |
validity | Passport Validity | |
issue_at | Place of issue | |
first_name_zh | Name (Chinese) | |
last_name_zh | Surname (Chinese) | |
first_name_in | Name (English) | |
last_name_in | Family name (English) | |
Social security card social_security | card_A | Social Security Card Number |
Account book residence_info | birth_place | birthplace |
residence_place | Registered place of residence |
When you call a field to fill out a form, you call the corresponding group, such as:`base_info.name`,`base_info.birthday``passport.passport_A`。
# 2, form example
<form bindsubmit="submit">
<input class="weui-input" placeholder""name" auto-fill="base_info.name" />
<input class="weui-input" placeholder-"mobile phone" auto-fill="phone_info.phone" />
<input class="weui-input" Placeholder = "ID" auto-fill="base_info.id_card_in one" />
<picker placeholder "address" auto-fill="address_info.address" />
<button form-type="submit">submit</button>
</form>
Note:<picker>
Using auto-fill will only be filled, will not affect the options, and if you are not satisfied with the auto-fill results, you can still manually select changes.
# 3. Test Cases
In addition to the above documentation, you can also download the following test case, test trial.
to hitDownload Test Case