Display Column and Input Hints
Choose the display column that labels a record, set the CMS default sort, and give the CMS input hints for each field.
Presentation settings on a table: the display column, which labels a record in references and responses; defaultSort, the CMS list order; and input hints, which choose the CMS editor for a field. Start at Database Schema for the table forms.
Display Column
When a table has foreign key columns (e.g., departmentId referencing departments), Quickback can automatically resolve the human-readable label in GET and LIST responses. This eliminates the need for frontend lookup calls.
Auto-Detection
Quickback auto-detects the display column by checking for common column names in this order:
name → title → label → headline → subject → code → displayName → fullName → description
If your departments table has a name column, it's automatically used as the display column. No config needed.
Explicit Override
Override the auto-detected column with displayColumn:
export default defineTable(interviewStages, {
// ... columns, firewall, guards, crud
displayColumn: 'label', // Use 'label' instead of auto-detected 'name'
read: { access: { roles: ["hiring-manager", "recruiter"] } },
});Default Sort
Set a default sort order for the CMS table list view with defaultSort:
export default defineTable(podcastEpisodes, {
// ... columns
defaultSort: { field: "createdAt", order: "desc" },
firewall: [{ exception: true }],
read: { access: { roles: ["PUBLIC"] } },
});The CMS applies this sort when the table first loads. Users can still click column headers to change the sort order.
How Labels Appear in Responses
For any FK column ending in Id, the API adds a _label field with the resolved display value:
{
"id": "job_abc",
"title": "Senior Engineer",
"departmentId": "dept_xyz",
"department_label": "Engineering",
"locationId": "loc_123",
"location_label": "San Francisco"
}The pattern is {columnWithoutId}_label. The frontend can find all labels with:
Object.keys(record).filter(k => k.endsWith('_label'))Label resolution works within the same feature (tables in the same feature directory). System columns (organizationId, createdBy, modifiedBy) are never resolved.
For LIST endpoints, labels are batch-resolved efficiently — one query per FK column, not per record.
Input Hints
Control how the CMS renders form inputs for specific columns. By default the CMS infers the control from the column itself — q.timestamp() → date-time picker, q.date() → date picker, q.bool() → checkbox, q.int() / q.bigint() / q.smallint() → number, q.decimal() → text (so the exact string is sent), q.enum() → select, q.enum([...]).array() → multiple checkboxes that send an array, q.url() → URL input, q.json() → textarea that validates and sends JSON, and name patterns for plain text (*Url, *Notes, email). The registry carries the q column kind, so this works on SQLite too, where every timestamp is text at the SQL layer. Other .array() columns do not yet have a dedicated CMS editor. inputHints overrides the inference except for enum arrays, which must retain an array value:
export default defineTable(jobs, {
inputHints: {
status: "select",
department: "select",
salaryMin: "currency",
salaryMax: "currency",
description: "richtext",
},
// ... firewall, guards, crud
});Available Hint Values
| Hint | Renders As |
|---|---|
richtext | Rich text editor (tiptap) — bold, italic, headings, lists, links. Stores HTML. Lazy-loaded in edit mode, rendered as formatted HTML in view mode. |
select | Dropdown select (single value) |
multi-select | Falls back to the inferred control; enum arrays render as multiple checkboxes |
radio | Radio button group |
checkbox | Checkbox toggle |
textarea | Multi-line text input |
lookup | FK typeahead search |
hidden | Hidden from forms |
color | Color picker |
date | Date picker |
datetime | Date + time picker |
time | Time picker |
currency | Currency input with formatting |
Input hints are emitted in the schema registry as inputHints on the table metadata, and the CMS reads them to render the appropriate form controls. The bundled CMS form renders richtext, select, checkbox, textarea, date, datetime, currency, number, email, url, and text today; any other hint falls back to the inferred control.
Rich Text Example
For fields that contain HTML content (e.g., blog posts, descriptions from RSS feeds), use "richtext":
export default defineTable(podcastEpisodes, {
inputHints: { description: "richtext" },
// ...
});The CMS will:
- View mode: Render the HTML with proper formatting (headings, lists, links, etc.)
- Edit mode: Load a tiptap rich text editor with a toolbar (bold, italic, H2, H3, bullet/ordered lists, links, code, undo/redo)
- Storage: HTML strings — no format conversion needed, compatible with external HTML content
Constraints and Indexes
CHECK and unique constraints, unique constraints under soft delete, and the default index set the compiler generates.
Connected issue tracker example
A complete feature with tenant-safe foreign keys, reporter-or-assignee editing, validated assignment, transitions, views, and realtime.