How to Use a Lookup Field as a Dropdown Filter in TableCrafter

Lookup fields in TableCrafter solve one of the most common pain points in Gravity Forms tables: raw IDs showing up instead of human-readable labels. When you combine lookup field resolution with dropdown filtering, you get a table where visitors can filter rows by meaningful names rather than cryptic numbers. This guide walks through the complete setup, from configuring the lookup field in the table builder to surfacing it as an interactive dropdown filter on the frontend. 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]. Frontend editing reduces admin support requests by an average of 42% in multi-user WordPress environments (WP Buffs, 2024).
What Is a Lookup Field in TableCrafter?
Gravity Forms often stores relational data as IDs. A trucking dispatch form might store a driver ID, a route code, or a client reference number rather than the full name. Without resolution, your table displays entry_id 47 instead of "Maria Gonzalez." That is where lookup fields come in.
A lookup field is a Pro column type that maps a raw value stored in a Gravity Forms entry to a display label. TableCrafter uses a three-tier fallback to resolve the label:
- A direct entry lookup against another Gravity Forms form
- A WordPress user lookup (for user ID fields)
- A static key/value mapping you define in the column settings
The resolved label is what appears in the cell, what gets exported, and, most importantly for this guide, what populates the dropdown filter options.
Step 1: How Do I Add and Configure a Lookup Column?
Open TableCrafter → Tables in your WordPress admin and either create a new table or edit an existing one. In the table builder, locate the column you want to resolve (for example, your "Driver" column that stores a user ID) and change its Column Type to Lookup.
A lookup column exposes three configuration fields:
- Source Form: Select the Gravity Forms form whose entries you want to look up. Leave blank to use the WordPress user table instead.
- Match Field: The field in the source form that holds the matching key (typically the same ID stored in the current entry).
- Display Field: The field in the source form whose value you want to show in the cell, such as a full name or label.
For a WordPress user lookup, skip Source Form and Match Field. TableCrafter automatically maps the stored integer to the user's display name.
key=Label pairs, one per line. This is useful for small controlled vocabularies like status codes or department abbreviations.Save the column. The table preview should now show resolved labels instead of raw IDs whenever entries exist that match.
Step 2: How Do I Enable the Dropdown Filter for That Column?
With the lookup column saved, scroll to the Filters tab in the table builder. TableCrafter lists every column as a potential filter. Find your lookup column and change its filter type from None or Text Search to Dropdown.
When a lookup column uses the dropdown filter type, TableCrafter automatically populates the filter options from the resolved labels rather than the raw stored values. This means your site visitors see a dropdown containing names like "Maria Gonzalez" and "James Park" rather than user IDs 47 and 112.
You can also enable Multi-Select for the filter, which lets visitors pick more than one label at a time. TableCrafter handles the OR logic server-side, returning rows that match any of the selected values.
Step 3: How Do I Embed the Table with the Shortcode?
Once the table is configured, embed it on any page or post using one of the three supported shortcode aliases. All three map to the same handler:
[tablecrafter id="X"]
[tablecrafter id="X"]
[tablecrafter id="X"]
Replace X with the numeric table ID shown in TableCrafter → Tables. The table renders with your configured dropdown filter visible above the data rows. No additional shortcode attributes are needed to activate the filter, because filter visibility is controlled entirely through the table builder settings.
If you want to pre-filter the table to a specific lookup value on page load, you can pass a URL query parameter that matches the filter's internal field key. This is useful for linking from a summary dashboard directly to a filtered detail view.
After completing this step, verify the result by viewing the page as a logged-out visitor in an incognito window. This confirms the table behaves correctly for public visitors rather than reflecting admin-level permissions that may hide configuration issues during initial setup. Check both the rendered output and the browser console for any JavaScript errors.
Step 4: How Do I Test the Filter End-to-End?
Before considering the setup complete, verify the full data path in a real browser:
- Load the page containing your
[tablecrafter id="X"]shortcode while logged out or as a lower-privilege user to confirm role-based permissions are correct. - Open the dropdown filter and confirm the options show resolved labels, not raw IDs.
- Select a single label and verify the table rows update via AJAX without a full page reload. All filter requests go to
wp-admin/admin-ajax.phpwith nonce validation, so check the browser console for any 400 or 403 responses if filtering does not work. - If multi-select is enabled, select two or more options and confirm rows matching either value appear.
- Clear the filter and confirm all rows return.
querySelector null error on the frontend usually means the table container failed to render, often because the current user lacks permission to view the table. Check TableCrafter → Tables → Edit → Permissions to confirm the correct roles are allowed.How Do Role-Based Permissions and Column-Level Visibility Work?
TableCrafter Pro supports permissions at two levels: table-level and column-level. This matters for lookup-based dropdown filters because you may want certain roles to filter by driver name but not to see the underlying user ID column at all.
In the table builder's Permissions tab, you can specify which WordPress roles are allowed to view the table. If a user's role is not in the allowed list, the shortcode renders nothing and the AJAX endpoints return a permission error rather than data.
Column-level visibility lets you show the resolved lookup label to all roles while hiding a raw ID column from non-admin users. The dropdown filter respects column visibility, so a hidden column's filter will not appear to roles that cannot see it.
A common pattern for multi-role applications (such as a load tracking system with admin and driver roles) is:
- Admins see all columns, including raw IDs, with full inline editing and all filters.
- Driver users see only the lookup-resolved display columns with read-only access and filtered views scoped to their own entries.
This is configured entirely through the table builder without writing any custom PHP. TableCrafter enforces all permission checks server-side on every AJAX request, so client-side manipulation cannot bypass the restrictions.
Frequently Asked Questions
What Is a Lookup Field in TableCrafter?
Gravity Forms often stores relational data as IDs. A trucking dispatch form might store a driver ID, a route code, or a client reference number rather than the full name. Without resolution, your table displays entry_id 47 instead of "Maria Gonzalez." That is where lookup fields come in.
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.
The permission check runs server-side on every request. Frontend users cannot bypass column restrictions by modifying the HTML or disabling JavaScript, because TableCrafter evaluates the current user's role before the data leaves the server.
The column mapping you define here is stored as a JSON configuration in the WordPress database. You can export this configuration using the TableCrafter export tool and import it to another table or another site. This is useful when replicating a table layout across multiple pages or when migrating a table to a staging environment for testing before going live.