How to Build a Lookup Field Across Two Gravity Forms in TableCrafter

Gravity Forms stores related data in separate forms all the time, a contacts form here, a projects form there, but displaying that relationship cleanly in a table requires something more than a raw entry ID. TableCrafter's lookup field feature resolves those cross-form IDs into human-readable labels at render time, so your tables show "Acme Corp" instead of entry_id 247. This guide walks through the full setup from both forms to a working lookup column. WordPress powers 43% of all websites globally (W3Techs, July 2026), and TableCrafter bridges the gap between the data you collect and the tables your users need to see, no custom PHP, no dashboard access required for viewers. The free version on WordPress.org supports CSV, JSON, Google Sheets, and Excel. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, export to CSV/PDF, role-based column visibility, and auto-refresh. Every table embeds on any page with a [tablecrafter]. WordPress sites with interactive tables see 31% longer average session durations (Semrush, 2024).
What a Lookup Field Does (and When You Need One)?
When a Gravity Forms entry stores a reference to another form's entry, typically via a drop-down or hidden field that saves a numeric ID, you end up with a column full of integers that mean nothing to readers. A lookup field in TableCrafter bridges that gap: it reads the stored ID, fetches the matching entry from the target form, and displays the value of a field you designate as the label.
Common use cases include:
- A load-submission form that stores a driver ID, where the driver list lives in a separate Gravity Forms entry set.
- A project tracker that stores a client entry ID, with client details in a contacts form.
- An order form that references a product catalog form for SKU and description resolution.
The lookup system in TableCrafter uses a three-tier fallback: it first attempts to resolve the ID via a cached entry map, then falls back to a live GFAPI::get_entry() call, and finally falls back to displaying the raw value if resolution fails. This means tables remain readable even when the referenced entry has been deleted or the source form is temporarily unavailable.
How Do I Set Up Your Two Gravity Forms?
Before touching TableCrafter, you need both forms in a consistent state. Let's use a concrete example: a "Driver Directory" form and a "Load Report" form. The Load Report form has a drop-down field that lets dispatchers select a driver. That drop-down stores the driver's Gravity Forms entry ID from the Driver Directory form.
Step 1, Create or audit your source form (Driver Directory). This is the form whose entries will be looked up. Make sure it has a clearly identifiable label field, typically First Name + Last Name, or a dedicated "Display Name" field. Note the form ID (visible in Gravity Forms → Forms in the URL, e.g., form_id=3) and the field ID of the label you want to display (visible in the form editor by clicking the field and checking the Field ID panel).
Step 2, Audit your referencing form (Load Report). Find the field that stores the driver's entry ID. If it is a drop-down populated dynamically, confirm it saves numeric entry IDs as its value (not display labels). Note the field ID of this reference field. You will need both the form ID and this field ID in the TableCrafter column configuration.
How Do I Build the Table in TableCrafter?
With both forms confirmed, navigate to TableCrafter → Tables → Add New in your WordPress admin. This opens the drag-and-drop table builder.
Step 3, Select your data source. In the Data Source panel, choose Gravity Forms and select your referencing form, the Load Report form in our example. This form's entries will populate the table rows.
Step 4, Add your standard columns. Drag the fields you want to display as regular columns into the column list: load date, origin, destination, status, and so on. Configure their labels, widths, and visibility as needed.
Step 5, Add the lookup column. Drag the driver reference field (the one that stores the entry ID) into the column list. With the column selected, locate the Field Type setting in the column configuration panel and change it from Standard to Lookup. Two additional fields will appear:
- Lookup Form ID, enter the form ID of the Driver Directory form.
- Lookup Display Field ID, enter the field ID of the label field in the Driver Directory form (e.g., the "Full Name" field).
Save the table. TableCrafter assigns an internal table ID (visible in the table list under the Name column). You are ready to embed it.
How Do Embedding and Verifying the Table Work?
Paste the shortcode for your table into any page, post, or widget area. All three shortcode variants point to the same handler:
[tablecrafter id="12"]
[tablecrafter id="12"]
[tablecrafter id="12"]
Load the page on the frontend. The driver column should now display resolved names like "Marcus Webb" instead of "entry_id 58". If you see raw IDs instead of names, check the following in order:
- Confirm your Pro license is active under TableCrafter → Settings → License.
- Verify the Lookup Form ID matches the Driver Directory form's ID exactly.
- Verify the Lookup Display Field ID corresponds to a field that actually holds text (not a file upload or calculated field).
- Confirm that the referencing field genuinely saves entry IDs (not display labels) by checking a raw entry as described above.
How Do Combining Lookup Fields with Inline Editing and Filters Work?
Lookup fields become especially powerful when combined with other Pro features.
Inline editing on lookup columns. When you enable inline editing on a table (Table Settings → Enable Inline Editing), lookup columns render as dropdowns populated from the target form's entries. Clicking a driver cell opens a select element listing all Driver Directory entries by their display field label. Selecting a new driver and saving writes the new entry ID back via GFAPI::update_entry_field(), the lookup display updates immediately on save without a page reload.
Filtering by resolved labels. TableCrafter's advanced filters let you add a filter control tied to a lookup column. Users see a dropdown of resolved labels (driver names, client names, product names) rather than opaque IDs, making the filter immediately usable without any extra configuration on your part.
Role-based visibility. With column-level permissions you can show the raw ID column to admins (useful for debugging or export) while showing the resolved lookup column to dispatchers and drivers. Configure this per column in the column settings panel under Visible to Roles.
Export behavior. When exporting to CSV, Excel, or PDF via the export button, lookup columns export the resolved label value, not the raw ID. This means exported reports are immediately readable in Excel without a VLOOKUP step.
How Does Troubleshooting Common Lookup Issues Work?
A few patterns come up repeatedly when setting up cross-form lookups for the first time.
"Loading options..." spinner that never resolves. This happens when the Lookup Form ID or Lookup Display Field ID is incorrect, or when the table builder cannot reach the target form. Open your browser's network inspector, trigger the inline edit click, and look for the AJAX call to wp-admin/admin-ajax.php. The response JSON will include an error message identifying the exact failure point. TableCrafter's AJAX calls include nonce validation and capability checks, so also confirm the current user has permission to read entries from the target form.
Lookup resolves to blank. The target entry exists but the display field is empty. Check whether the Driver Directory entries actually have the label field populated. A common cause is importing entries from CSV where column mapping left that field empty.
Lookup shows a different field's value. Double-check the Lookup Display Field ID. Field IDs in Gravity Forms are per-form integers; ID 4 in the Driver Directory is a different field than ID 4 in the Load Report form.
Performance slowdown on large tables. If your referencing form has thousands of entries and each row triggers a separate lookup, consider enabling the auto-refresh interval sparingly. TableCrafter batches resolution where possible, but very large entry sets benefit from database-level caching or a dedicated integration. The Pro tier's entry limit is unlimited, but server PHP memory limits still apply.
Frequently Asked Questions
How Does What a Lookup Field Does (and When You Need One) Work?
When a Gravity Forms entry stores a reference to another form's entry, typically via a drop-down or hidden field that saves a numeric ID, you end up with a column full of integers that mean nothing to readers. A lookup field in TableCrafter bridges that gap: it reads the stored ID, fetches the matching entry from the target form, and displays the value of a field you designate as the label.
What Is TableCrafter?
TableCrafter is a WordPress plugin that turns data from Gravity Forms, Google Sheets, Airtable, Notion, REST APIs, CSV files, and WooCommerce into interactive, sortable, filterable frontend tables. Embed any table on any WordPress page with the [tablecrafter] shortcode or the native Gutenberg block. No PHP or custom development required. The free version supports CSV, JSON, Google Sheets, and Excel. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, export to CSV and PDF, role-based column visibility, and auto-refresh.
Does this require PHP or developer skills?
No. TableCrafter is configured entirely through the WordPress admin interface. You choose your data source, map fields to columns, and set display preferences using point-and-click controls. Embedding uses the [tablecrafter] shortcode or the native Gutenberg block.
Is the free version sufficient or do I need Pro?
The free plugin on WordPress.org supports CSV, JSON, Google Sheets, and Excel sources with unlimited tables, rows, and columns. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST API sources, inline cell editing, bulk row actions, export to CSV and PDF, role-based column visibility, and auto-refresh every N seconds.
Ready to try it?
TableCrafter is free on WordPress.org. Pro unlocks inline editing, role-based permissions, and advanced data sources.
Column order is preserved across sessions. Once you set a column order in the table builder, that order persists in the shortcode output for all visitors. Users with the column reorder permission can adjust their own view without affecting the default seen by others.
TableCrafter re-fetches this data on each page load by default. If your data source updates infrequently and your site has significant traffic, enable the built-in caching option in the table's Performance tab. This stores the fetched data for a configurable number of minutes and serves it from WordPress transients, reducing API calls to the source and improving page load time for visitors.