🔴 On2Air Forms - JotForm has been shutdown to focus on our On2Air Backups Airtable app Learn more about automated Airtable backups - on2air.com
Links are automatically generated URLs you can use to prefill form fields with your Airtable data for your form user.
This gives your user a more custom and simple experience when filling out your form. This is how you set it up in On2Air JotForm.
- Setting Up Your Links
- Sources - Use Airtable Data as Pre-filled Values in your Form Fields
- Set up Source
- Delete Source
- Field Links - Map Data from Airtable to Form Fields (Plus Default Values)
Setting Up Your Links
- From your Form dashboard, click Links
- In Links, click Initialize Links
Sources - Use Airtable Data as Pre-filled Values in your Form Fields
Sources allow you to pull data from your Airtable records to use as pre-filled values in your form fields.
Sources are used if you want to update existing records in Airtable. It is not needed if you are only creating new records.
Set up Source
Repeat the Sources steps for each prefilled form field
- Click New
- Add a Source Name
- A URL Parameter Key is automatically generated to match your Source Name
- Select your Airtable Connection
- Select your Airtable Base - The base containing the information you want to prefill
- Select your Airtable Table
- Select your Airtable View (Optional) All records are used as the default
- Use Record ID (Optional) - Match your Field Record by the Record ID instead of the Lookup Field
- Lookup Field - Choose the Field in Airtable used for the lookup
Once a Source is created, you will see columns containing
**Name** - Your Source Name
**Param Key** - The parameter to be used in your URL
**Source** - The Airtable base and table used as your data source
**Field** - The field in your table used as the prefilled data
- To Update your Source, click Update Details
Delete Source
- To Delete a Source, click Edit next to the Source
- Click Delete
- Are you sure you want to delete this source? Click Delete
Field Links - Map Data from Airtable to Form Fields (Plus Default Values)
Field Links are used to map the data from your Airtable base to your form fields. While Sources provides you with the source of data to display, Field Links is the connection from your Airtable data to your specific JotForm fields. These are also useful for adding default values to newly created records.
- Repeat the following steps for each field in your form
Connecting to Your Form Fields with Field Links
- Click Sync to populate the fields from your form
Once Field Links are synced, you will see columns containing
**Form Field** - The name of your field in JotForm
**Airtable Field** - The Airtable field and Source
**Create Default** - The default value for newly created field data
- Click Edit to connect your form field to your Airtable field
- Select your Source (Table) You will see the Source name and the Table name
- Select your Airtable Field _This needs to match the Initial Field you chose in the form builder in Advanced Search Configuration _ Currently, there is no way to have it automatically populate your Initial Field
Example: A Select field in my form is from my States table and the Initial Field is State. The Airtable Field in Field Links also needs to be State.
Default Value on Create (Optional) - Set a default prefill value to be used for Create links
Links Settings
Response Format - Used to determine how the link is formatted * OptionsRedirect - When the Create Link or Edit Link is used, it will automatically redirect to the third-party form URL style, while still maintaining the prefilled values Inline - Uses the generated URL exactly as seen JSON - This will output a JSON response containing the URL Useful for Scripting
Advanced Format Features
You can pass in a parameter of ?response_format=inline
or any other response format (json or redirect) at the end of your URL to override the response type
Code - A unique code for your Links setup (Useful for referencing as a unique ID) _If you would like a new code, click Refresh Code _
After Sources and Field Links are complete
- Click Update Links Details to update your links
- Click Discard Changes to discard your updates
Using Your Create Link and Edit Link
Once your Source(s) and Field Links are set up, your Create Link and Edit Link templates will automatically update
Create Link - Used for creating new records in your Airtable base
Edit Link - Used to edit existing records in your Airtable base
- Click the Copy icon next to the Create Link or the Edit Link
- You will then add your pre-filled value into the URL
- The Edit Link will need to have data from your Airtable field record
Example Link
http://formsapi.o2adev.com/api/forms/links/edit/zK0GxKsr?state={States.State}&city={Cities.City}
state = The URL parameter that was automatically created when you added a Source Name
city= The URL parameter that was automatically created when you added a Source Name
States.State = States Table and State Field
Cities.City = Cities Tables and City Field
A Sample Pre-Filled Link
http://formsapi.o2adev.com/api/forms/links/edit/zK0GxKsr?state=California&city=Burbank
We used California as the State and Burbank as the City. If you chose Record ID in the settings instead of a Lookup Field, you will need to use the Record ID as the pre-filled value.
Both California and Burbank are field options for State and City in our Airtable base
You can use this form link wherever you need to pre-fill the values of California and Burbank