Select Page
How to Add URL Prefills for Linked Records (Pre-Populate Linked Records)

How to Add URL Prefills for Linked Records (Pre-Populate Linked Records)

🔴 On2Air Forms has been shutdown to focus on our On2Air Backups Airtable app Learn more about automated Airtable backups - on2air.com

You can use URL Prefills to add linked records to your Airtable fields on a form. You can use URL Prefills to share your form URL with anyone and have it automatically pre-populate data into your form fields. On2Air Forms makes it easy to add data and values to any field on your form.

Example: You can send a form to someone with their Company linked record already added to their form.

image

What are URL Prefills?

A URL Prefill Parameter is a way to pass information through a URL. You can add single or multiple URL prefills to modify content or track information. 

What are URL Prefills Used for in Airtable and On2Air Forms?

Using URL Prefill Parameters with On2Air Forms allows you to automatically add data from Airtable or Static data to a form field with the URL you share.

URL Prefill Formatting

URL Prefills, also known as URL Parameters, are made of a key and a value separated by an equals sign (=). The first prefill parameter always comes after a question mark in a URL.

Linked Record URL Prefill Options

You have a couple of options to prefill linked records in your form

  1. Use a Field to Match/Filter Records
  2. Use a Record ID

  • Using the Field Match/Filter option a more dynamic way to display records. Any record that matches your Linked Field setting will be displayed.
  • Using the Record ID can be useful for showing or sharing single records.

Use a Field to Match/Filter Records - URL Linked Field

In your Linked Record field, you can use the URL Linked Field option in the Field Configuration menu. You can use it to choose a field to filter (match) with and then enter a value in the URL Prefills Settings.

Example:

  • This is a States table and a Cities table that are linked in Airtable

image

  • City is a Linked Record field on my form. We want to prefill the City field with all Cities that are in the State of Texas.

  • In the Field Configuration menu of the City linked record, in the URL Linked Field, we choose the State Linked Record field as the URL Linked Field.

image

  • In the URL Prefill Settings, we enter Texas as the value in the City prefill field

image

  • Click Share Form
  • On the Share options, click Include Prefills
  • A custom URL with your Prefill value will be created

image

  • The final URL will be as shown below with ?city=Texas as the URL Prefill

https://on2air.com/form/3dSUGN?city=Texas

➡️
The final form with the URL Prefill will display the 3 Cities that contain Texas in the linked States field.

This is a great to display a list of specific records for a user.

You can disable any Subform permissions on the Linked record field, so all they can see is a table of records. Learn more:

image

You can also use Record IDs to prefill linked records. Learn how in the next section.

Use Record IDs to Prefill Records

If you don't use the URL Linked Field option, you can use Record IDs to prefill Linked Records.

Your form URL would follow the format below:

https://on2air.com/form/3dSUGN?linked_record_field_prefill_key=recid1,recid2,recid3

To auto-generate a URL for each record with prefills in your table with the following format. Add a Formula or Button field to your table:

"https://on2air.com/form/2qNScr?partner=" & RECORD_ID()

where ?partner= is a prefill key

Example:

City is the Linked Record field on my form below. We want to prefill the City field with the Dallas record.

image

  • In Airtable, copy the Record ID for the specific record you want prefilled.
    • To add multiple Record IDs to the prefill, you can use a comma to separate the Record IDs in the URL Prefill settings.

The Record ID in Airtable for the Dallas record is recaLFowkTszjRgIj.

image

  • In your Linked Record Field in On2Air Forms, your URL Prefill key will be the field name

Example: In the City linked record field, the URL Prefill Key (located in the Field Configuration) is city

  • You can change your URL Prefill key to any other value if desired

image

  • Click Set Prefill in the URL Prefill setting in your Linked Record field

image

  • Add your Record ID to the corresponding field in the URL Prefill setting and click Done.
    • If needed, be sure to add the prefill to both the Create mode and Update mode prefill settings.

image

  • To add multiple Record IDs to the prefill, you can use a comma to separate the Record IDs.

image

  • Next, click Share Form

image

  • Click Include Prefills
    • Your prefill value will automatically be added to the URL. You can now share the prefill URL with anyone and it will add the value to your linked record

image

The form will display like below.

Single Record ID

image

Multiple Record IDs

image

If you need more than a few records to display, it would be easier to create a filter and use the Field Match URL Linked Field option


Single Record ID

https://on2air.com/form/3dSUGN?city=recaLFowkTszjRgIj

Multiple Record IDs

https://on2air.com/form/3dSUGN?city=recaLFowkTszjRgIj,recPeMCI00Fr4Dq8P,rec0Fd5CMgl1rgdLa