Auto-filling values into create forms
You can pre-fill fields in create forms by constructing an auto-fill URL. You can then add the URL to your app as a button to allow your users to create new records with some fields already filled in.
Field Types you can Auto-fill
Text fields- You can auto-fill short text or long text fields.
Single and Multi-select fields- You can only auto-fill a single value for multi-select fields.
Link to another record field- You can use the Stacker Record ID to link records.
Checkbox field- You use 'true' to fill the checkbox or 'false' to un-fill the checkbox.
Number, Percentage and Currency fields- You should type percentages as a fraction, for example, 40% is given as 0.4 in the URL.
Basic Link Structure
Auto-fill URL format: /page/new?autofill__field=value
/page/new
: The URL of your create form page.field
: The developer name of the field you want to fill.value
: The content you want to auto-fill in the field.
Auto-fill Multiple Fields
Auto-fill multiple fields by adding the
&
separator in the URL, for example:
Find the developer name
Go to Manage fields and data
Select the table name
Select Fields
Select Show developer name
The developer name shows below the field name
Note
Developer names are always lowercase and case sensitive
Pre-filling linked records
To auto-fill a link to another record, you need the Stacker Record ID for the linked record.
Open the detail page of a record
How to create the Auto-fill URL in Stacker
Go to Manage Fields and Data
Open the table you want the form to be accessed on
Add a new URL field
Insert the URL for the create form:
https://[workspace].stackerhq.com/app name/page/new
Add
?autofill__field=value
to the end of the URLReplace
field
with the Developer name and replacevalue
with the content you are auto-filling
How to create the Auto-fill URL in Airtable
Go to the table on Airtable you want to access the create form
Add a new URL field
Insert the Auto-fill link:
https://[workspace].stackerhq.com/app name/page/new?autofill__[developer field name]=value
How to use your Auto-fill Link
Add a button or quick links widget on a detail record layout to use the URL from a field on your data source.
Add a banner widget on the detail record layout to use one URL for all of your records.
Add a button on a list layout to use the URL from a field on your data source.
Use an auto-fill URL to fill a create form based on a specific record. For example, you can create a new order for a particular item in an inventory table. Rather than writing the URL for each individual record, we can use a formula in Stacker or Airtable to do it automatically.
Auto-generation of Auto-fill URL links on Airtable
Auto-fill a field dynamically based on the current record, by using formulas in Airtable.
The Auto-fill formula format:
Create a new formula field on Airtable on the page you want to access the auto-fill URL
Insert the Auto-fill formula using the URL from the Create form you want to auto-fill
Replace
field1
with the Developer field nameUse the
RECORD_ID()
Formula after the&
sign
Auto-generation of Auto-fill URL links on Stacker
You can create an auto-fill link using a formula field in Stacker:
Go to the table you want to access the Auto-fill link
Add a new Formula field with the
CONCAT( , )
formulaCopy the URL from the Create Form you want to Auto-fill (example:
https://[Workspace].stackerhq.com/[app]/[table]/new
)Paste the URL into the first part of the Formula:
Concat(”URL here”,{field name})
Add
?autofill_ _(developer field name)=
to the end of the URLAdd the field you want to use to populate on the Create form: (example:
{Order Name}
)
Last updated