Skip to main content

Dialog builder

The Record form stage of the Screen Designer opens the visual builder — a WYSIWYG editor for the add/edit form. The data model is the same ScreenDialog shape stored in screens.toml, but instead of editing TOML you add fields to tabs and tune them in a side inspector.

A screen without a dialog still works as a read-only / grid-edit table. Build a dialog when the user needs a full form to add or edit rows.


Three-column layout​

Screen Designer ·[screens.crm.customers]✕ Cancel⤡WHAT IT ISCustomersDATAcustomers_get3 save query(ies)GRID6 column(s)3 filter(s) · 1 view(s)RECORD FORM2 tab(s)8 field(s)ACTIONS1 toolbar action(s)2 in the row menu · 1 on s…OUTPUTthe grid's own exportDelete dialogADD A FIELD‹DictionaryColumns⌕ filter…⚿ACTIVEActive⚿ADDRESSAddress⚿CITYCity⚿COUNTRYCountry⚿CREDIT_LIMITCredit limit⚿CUSTOMER_IDCustomer⚿EMAILE-mail⚿NAMEName⚿STATUSStatusClick an item to add it to the current tab.DIALOGcols: 2 · fields: 4≋ General · 4≋ Address · 4+ Add tab› Tab settingsform# Customer123CUSTOMER_IDkey≡ Name…NAME≡ Country…COUNTRY⌕ Statuslookup: get_statusSTATUS+ Add fieldINSPECTOR›Dialog title› NAME▤ NAMEThis field renders its column.≋ Column configurationGeneralDisplayFilterRulesEditDefaultsNAME ∗NAMEDD(default)▾KEYdisabledSave✕ CancelTabs of the form+ Add tab; drag a card acrossTab settingslabel, type, columns, tab actionsAdd a fielddictionary entries or columnsClick to addto the current tabDelete dialogback to a grid-only screenInspectorthe picked field and its columnSame settings as the gridDisplay ▸ Colspan for the spanSelected cardits column opens on the right
RegionWhat it does
Add a field (left)Source of new fields. Two sub-tabs: Dictionary (every entry available on the current connector scope) and Columns (every column the read query returns). A filter narrows the list; a click on an entry adds a field card to the current tab. The panel folds away with its arrow.
Dialog (center)The tabs strip across the top — each tab with its field count, + Add tab at the end — then Tab settings (folded: tab label, tab type, columns, the title in the other languages, the two Left out boxes, tab actions) and the field cards. Each card shows the label, a preview of the input (a number, a date, a lookup and its query…), the column name and its key mark; the picked card has a blue border. The header counts the grid's columns and the tab's fields. A Hidden fields group at the bottom collects the fields with hidden = true.
Inspector (right)The picked field and its Column configuration — see Step 3 —, or, with no field picked, the dialog's title and its events. It folds away with its arrow.

Delete dialog, above the panels, removes the whole form: the screen becomes a read-only or grid-edit table again.


Building from scratch​

Step 1 — Open the Record form stage​

The first time, the canvas is empty with a Create dialog button. Click it to seed dialog.tabs = [{id: 'general', label: 'General', fields: []}] and reveal the three-column layout.

Step 2 — Add the first tab's fields​

Two ways:

MethodWhen
Click a Dictionary entry or a column in Add a fieldAdds a field card at the end of the current tab. A dictionary entry pre-fills dd, so the field picks up the entry's rule; a column adds a plain field bound to the read query.
Click + Add field at the end of the tabAsks for the field name (a column of the read query) and adds it.

The added field becomes the selected card; the Inspector switches to it. Drag a card to put it elsewhere in the grid. Set colspan to widen it (the grid is by default 2 columns; a colspan = 2 field fills the row).

Step 3 — Tune the field properties​

A dialog field displays a screen column, and the column carries every behaviour. The Inspector shows:

SectionWhat it holds
BreadcrumbDialog title › FIELD — a click on Dialog title goes back to the dialog's own settings.
FieldThe field's name and, with several form tabs, the Tab it sits on.
Column configurationThe column's full editor — the same as in Grid → Columns: label, format, dictionary entry (dd), rule and lookup binds, required / read-only flags, conditions, defaults, and the field's span on the dialog grid (Display ▸ Colspan). A change applies to the grid as well.
EventsThe hooks wired on the screen, by event, for information — they are edited on the Actions stage.
Delete fieldRemoves the field from the tab; the column stays on the screen.

See Columns for each setting and Conditional fields for the conditions.

Step 4 — Add tabs​

Click + Add tab at the end of the tab strip; it asks for the tab's id. The new tab is empty; add fields from Add a field. Common tab patterns:

Tab nameWhat's on it
GeneralIdentity + most-used fields.
AuditCreated at, created by, updated at, updated by — often hide_on_add to hide the tab when inserting.
NotesFree-text fields.
AddressA group of related fields (street, city, postcode, country).

Tab settings​

Tab settings, above the field cards, sets the picked tab: its label, its type, its columns — and how it reads in other languages and when it is shown.

DIALOGcols: 2 · fields: 6Customer · 4Audit · 2+ Add tab▾ Tab settingsformTAB LABELCustomerTAB TYPEformForm — a grid of editable fields▾COLUMNS2TITLE IN THE OTHER LANGUAGESfrFranç…▾Client✕+ addLeft out when a record is addedLeft out when a record is editedTab actionsTabs of the formeach with its field countLabel, type, columnsas writtenTitle per languagein the user's languageLeft out on adde.g. an audit tabLeft out on edite.g. a creation-only tab
FieldEffect
Tab labelThe tab's title, as written.
Tab typeForm (a grid of editable fields), a nested table or another screen's form — see Nested tabs.
ColumnsThe number of columns of the tab's grid.
Title in the other languagesThe title for the users of another language: a language picked in the list, then its text; + add for another. A language with no line shows the tab label as written.
Left out when a record is added (hide_on_add)The tab is not shown when a new record is added.
Left out when a record is edited (hide_on_edit)The tab is not shown when an existing record is edited.
Tab actionsButtons shown inside the tab — see Tab actions.

Step 5 — Reorder fields​

Drag a field card within the same tab to reorder. Drag across to a different tab to move it between tabs. The drag is HTML5 native — the drop target highlights while you hover. When dragging is awkward, select the field and use the Tab picker in the Inspector to move it to another form tab — the field lands at the end of the target tab and stays selected.

Step 6 — Hide a field​

Two ways:

MethodEffect
Tick hidden in the column configuration (Display).The card moves to the Hidden fields group at the bottom of the Dialog panel. The field still binds at save time.
Delete the field from the tab.The field is removed from the dialog entirely. The column is still on the screen; it just doesn't surface in the form.

The "hide but keep" pattern is useful for technical columns the dialog must submit (e.g. an audit timestamp) but the user shouldn't see.


The three tab kinds​

Tabs aren't all the same. Three types live under dialog.tabs, discriminated on the type field:

TypePurpose
form (default)A grid of editable fields — the case described above.
nested_formThe form of another existing screen (form_screen), shown in the tab; param_binds pass the parent's values (usually its key) to that form's queries, and it is saved with the parent's Save. See Nested tabs.
nested_tableA related-rows TableView embedded in the tab. Renders another screen's grid scoped to the parent's PK. See Nested tabs.

The visual builder shows the same tab strip for all three — switching to a nested_form or nested_table tab shows the target-screen picker and its param_binds.


Per-tab actions​

Each tab can carry its own action list — buttons shown inside the tab, set under Tab settings → Tab actions (Add action). Common patterns:

PatternWhy per-tab
A Recompute button on a calculations tab.Triggers a stored procedure only when the user is looking at those fields.
A Test webhook button on a notification tab.Only meaningful in that context.
A Refresh from source button on a sync tab.Re-pulls data the tab displays.

The action editor opens in the Inspector when you click an action's row — the Inspector shows one thing at a time (a field OR an action). Selecting a field clears the action selection and vice versa.

See Actions and lifecycle for the full action types.


Dialog title​

The dialog's title sits at the top of the modal when it opens. Set it in the Inspector when no field is picked, under Dialog title; blank falls back to the screen's label (Falls back to the screen label), then to id. Below it, Events lists the hooks wired on the screen, for information.


Common pitfalls​

MistakeSymptomFix
Field on a tab references a column that doesn't exist in the read query.The dialog shows the field but the value is always blank, and saving sends no value for it.Either add the column to the read query or remove the field from the tab.
lookup_param_binds references a field that's not on the same tab.The bind resolves to NULL at submit.Either move the source field onto the same tab or use a cross-tab binding (the engine reads the whole form state, but the inspector's Param dropdown only lists fields visible on the current tab).
colspan = 3 on a 2-column grid.The field overflows; layout breaks.Cap colspan at the tab's cols.
Two fields with the same name on the same tab.The save sends two values for the same column; the second wins.Each field's name must be unique within the dialog.
hide_on_add = true AND hide_on_edit = true.The tab never appears.Either flip one off or drop the tab.

What's next​

  • Conditional fields — make a field appear / be required / be locked only under specific form conditions.
  • Actions and lifecycle — wire on_load / on_save / on_cancel to extend the dialog's behaviour.
  • Nested tabs — embed a child-record form or a related-rows grid.