You can fill form fields in advance for your visitors by using URL parameters for each field. Form fields have unique references, which can be used to fill out certain fields by default for visitors.
Find the field reference ID
The field reference ID is a unique identifier for each field in your form.
- On a form component, click the field you want to use. A sidebar will open.
- Scroll down to the bottom of the field options, and click REFERENCE.
- You can use the existing reference ID for the field or type a unique reference ID for each field.
- Keep the reference to use later. Repeat these steps for each field you want to use.
Build the URL
To build a URL with prefilled fields, you can use the reference IDs in the following formula:
<url of your Interfaces page>?<first reference ID>=<value to prepopulate>&<second reference ID>=<value to prepopulate>
The first field reference ID needs to be connected to the URL by a ?
, with its value connected by a =
, and each subsequent reference ID needs to be preceded by an &
and connected to its value by a =
.
The following example URL should open an Interfaces page with two fields prepopulated, Starting Date and Team:
https://url-parameters-test.zapier.app/sign-up?start_date=15-Mar-2023&team_name=Recruiting
Use URL parameters with embedded pages
You can also use URL parameters with embedded pages. To set this up, you'll first need to find the reference ID for the field you want to use. Once you have that ID:
- Click Share at the top of your interface page.
- Click the Embed tab, in the dialog box.
- At the bottom of the dialog box, select the checkbox for Allow query params.
- In the embed code field, look for
query-params=''
. - Paste the reference ID for the form field, followed by an equal sign and the desired value, between the single quotes. For example: if a field reference ID is "email" and the value you want it to use is "test@example.com", then you can use the embed code this way:
query-params='email=test@example.com'
. - Click Copy embed.
You can also use information submitted through a form field or managed user information to customize what visitors see.