Skip to main content

How to prefill child forms?

I want to prefill fields in the subform/nested form when I click on the + button to create a linked record.

Updated over a week ago

Prefilling a child form refers to the act of automatically filling in some of the fields in a child form when creating a new record in the linked records field. It's important to note that this feature only applies when you are creating a new record and not when editing an existing one. There are two ways to set this up.

Using Static Prefill

This method is applicable when you want the same prefill value to be applied to all records. To configure this, you can follow these steps:

  1. Child form settings

  2. Prefill section

  3. Prefill New Records

Using Dynamic Prefill

Dynamic prefills are used to automatically populate child form fields with information from a field in the main table (the form's table, or the users table when using a portal). This is commonly used in cases where you have different types of users and each type is prefilled in a different way. To set this up, you need to go to:

  1. Portal Tables or Form Fields

  2. Click on the linked records field or the table in question (if using a portal)

  3. Creating and Editing Records section

  4. Turn on Allow users to create new records toggle.

  5. Turn on Prefill child form for creating records toggle.

  6. In Airtable, create a formula field in your main table (the form's table, or the users table when using a portal). The formula should be something like:
    '?prefill_fieldNameFromLinkedTable=' & {fieldNameFromMainTable}.
    The first field is the field name of the field you want to prefill in the linked record, and the second is the field that holds the value in the main table.

  7. Once you have created the formula field, select that field as the prefill field on miniExtensions. You may need to refresh the fields list and wait a moment for it to appear.

💡Note

This is commonly used if you want to prefill a field that is not included in the Form Fields. In case both setups are populated, the child form will follow the prefill from the static prefill.

Related

Did this answer your question?