How to Set Up a Lookup Field in TableCrafter

Updated July 2026 • 6 min read • By Fahad Murtaza • By Fahad Murtaza

TableCrafter live search, sorting, filtering, and pagination out of the box
TableCrafter live search, sorting, filtering, and pagination out of the box

Gravity Forms stores relational data as raw IDs, a driver entry might show 42 where you expect Jane Smith. TableCrafter's lookup field feature resolves those IDs to human-readable labels automatically, right inside your table display, without touching your form or your database schema. This guide walks through the full setup process so your tables show meaningful data instead of numeric noise. 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] shortcode or the native Gutenberg block. TablePress has over 800,000 active installs on WordPress.org (WordPress.org, 2026).

What Is a Lookup Field?

A lookup field is a column configuration that takes a stored value, typically a numeric ID or a machine-readable key, and maps it to a display label pulled from another source. In TableCrafter, this works as a rendering layer: the underlying Gravity Forms entry is never modified. When a user views the table, TableCrafter intercepts the raw value, runs the lookup, and outputs the resolved label instead.

Common use cases include:

Pro feature: Lookup fields are available on the Pro tier only. Free tier tables display the raw stored value with no resolution layer.

How Does Before You Begin Work?

Make sure you have the following in place before configuring a lookup field:

Note: The three supported shortcodes, [tablecrafter id="X"], [tablecrafter id="X"], and [tablecrafter id="X"], all map to the same table renderer. Your existing shortcode does not need to change when you add a lookup column.

How Do I Configure the Lookup Field in the Table Builder?

Open the table you want to modify: go to TableCrafter → Tables, hover over the table row, and click Edit. This opens the drag-and-drop table builder.

In the Columns panel, locate the column that currently displays the raw ID. Click the column to expand its settings. You will see a Field Type dropdown. Change it from Standard to Lookup.

Once Lookup is selected, two additional fields appear:

For example, to resolve a WordPress user ID stored in field 3 of your form to the user's display name:

  1. Set Lookup Source to WordPress Users.
  2. Set Display Field to Display Name.
  3. Confirm the column's Form Field maps to the correct Gravity Forms field ID (the one storing the user ID).

Click Save Table at the top of the builder. TableCrafter writes the column configuration to the database and immediately applies it to the rendered shortcode output.

How Do User Lookup Fields and Inline Editing Work?

Pro When inline editing is enabled on the table, lookup columns get special treatment. Instead of showing a plain text input when a cell enters edit mode, TableCrafter renders a dropdown populated with all valid options from the lookup source. For a WordPress Users lookup, that means a searchable select of every user on the site. For a Gravity Forms Entries lookup, it pulls entry values from the linked form.

This behaviour uses a three-tier fallback system internally:

  1. Cache hit, resolved options are cached per-request to avoid redundant queries.
  2. Direct query, if the cache misses, TableCrafter queries the appropriate source (WP_User_Query, get_posts, or GFAPI::get_entries).
  3. Graceful degradation, if the source returns no results (deleted users, empty form), the raw ID is displayed with a warning indicator rather than a broken input.
Performance tip: For large WordPress installations with hundreds of users, consider enabling the Lazy-load options toggle in the column settings. This defers the user list fetch to an AJAX call triggered only when a cell enters edit mode, reducing initial page load overhead. All AJAX calls go to wp-admin/admin-ajax.php with nonce validation.

When a user selects a new value in the inline dropdown and saves, TableCrafter writes the raw ID back to the Gravity Forms entry using GFAPI::update_entry_field(). The display layer then resolves it again on next render. The stored data stays clean; only the presentation changes.

What Is Custom Mapping: Manual ID-to-Label Tables?

Sometimes your lookup source is not a WordPress object type, it might be a set of internal codes, status flags, or values defined outside WordPress entirely. For these cases, set Lookup Source to Custom Mapping.

A key-value editor appears. Enter each pair on its own row:

1 → Pending Review
2 → In Transit
3 → Delivered
4 → Cancelled

TableCrafter stores this mapping alongside the column config. When a cell value matches a key, the corresponding label is shown. Unmatched values fall through to display the raw value, so existing data is never silently hidden.

Custom mapping pairs well with the Status Badges feature (also Pro). After setting up a custom mapping, open the Badge sub-panel for the same column and assign a color to each label, Pending Review in amber, Delivered in green, and so on. The lookup resolves the ID to the label, and the badge layer converts the label to a color chip, giving you a fully visual status column with zero custom code.

How Does Troubleshooting Common Issues Work?

If your lookup column still shows raw IDs after saving, work through these checks in order:

Debug tip: TableCrafter logs lookup resolution errors to the WordPress debug log when WP_DEBUG_LOG is enabled. Search the log for [TableCrafter] entries to see exactly which lookups are failing and why.

Frequently Asked Questions

What Is a Lookup Field?

A lookup field is a column configuration that takes a stored value, typically a numeric ID or a machine-readable key, and maps it to a display label pulled from another source. In TableCrafter, this works as a rendering layer: the underlying Gravity Forms entry is never modified. When a user views the table, TableCrafter intercepts the raw value, runs the lookup, and outputs the resolved label i

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.

This step completes the connection between your data source and the TableCrafter table engine. Once saved, the plugin caches the connection credentials in the WordPress options table and uses them on every subsequent page load. If you update the source configuration later — for example, rotating an API key or changing a sheet URL — return to this step, enter the new value, and save again. The table updates immediately on next load without any shortcode changes.