How to prefill AirTable forms using field ID instead of field name

If you’re here you probably know you can populate an Airtable form filed using the name of the field.

This works great with one-off instances of form views but quickly becomes a hassle to maintain at scale.

Skip ahead to the Populating a form field with the field ID instead of field name section

Populate or pre-fill a field using the name

If you have an AirTable field named “First Name”, you can automatically populate that in a form using the URL parameter “prefill_” followed by the field name, like this:

One of the ways AirTable forms rock is because you can arbitrarily rename form fields without affecting the master field name. Maybe I want to share another version of the form above but label the field “Your First Name”. I would need to share a different URL to populate this field with a name, like this:

Populating a form field with the field ID instead of field name

I didn’t know this existed until I tried it on a whim in October 2022. The easy part first, just replace the field name in the URL with the ID of the field. Using the example URLs above, it would look like this:

Now anytime you want to populate that field, regardless of how it’s labeled in the form, you can reuse the “prefill_{fieldID}” portion.

Now the hard part;

How to get the ID of a field in AirTable

As of October 2022, I’ve found two decent ways to go about this:

  1. My preferred approach: get the field ID from the base’s API docs by visiting:{YOUR_BASE_ID}/api/docs or ▸ Choose your base
  2. Use a script like this or the extension “Field List” by Kuovonne

Once you get the ID of the field, you’re all set! I’ve extended this functionality a bit using Keyboard Maestro, with a dictionary of field IDs which I need to pre-fill on a regular basis.

Leave a Reply

Your email address will not be published. Required fields are marked *