Choice fields — dropdown, radio, checkboxes
One field control answers two independent questions: where do the options come from (a database table, a built-in preset like countries, or a manual list) and how should they look (a dropdown, a radio group, a checkbox list, or a type-ahead box). Pick a source and a display — any combination — and the same field shows friendly names while storing a small, joinable value.
One control, two questions
The Lookup Wizard edit control is the all-in-one choice field. Set Values from and Display as separately — every cell in this grid is a valid field:
| Display ↓ / Source → | Table | Preset | Manual |
|---|---|---|---|
| Dropdown | Customer from customers | Country from the ISO list | Status: Active/Inactive |
| Radio group | Branch from branches | Gender | Yes / No |
| Checkboxes (multiple) | Tags from tags | Days of the week | Interests: Sports, Music… |
| Type-ahead (ajax) | Any large table, searched live | Country — type to filter the ISO list | Type to filter your options |
Type-ahead works for every source: a table is searched live on the server; a preset or manual list is filtered instantly in the browser (no server round-trip). The plain Dropdown control also has a Searchable (type-ahead) switch that turns a long single-select list into the same type-to-filter box.
Values from — where the options come from
| Source | Use it for | What is stored |
|---|---|---|
| Table | Options that live in your own data and change over time — customers, branches, categories. Supports a WHERE, ordering, cascading parent/child, and add/edit on the fly. | The table’s key column (usually id); the user picks by the display column. |
| Preset | A common, standard list you shouldn’t have to type — countries, gender, marital status, and more (see below). Baked into the app, so it works offline. | The preset’s numeric id (for Countries you may instead store the ISO code, name or calling code). |
| Manual | A short, fixed list unique to one field — e.g. Active, Inactive. | Whatever you type. Use value:Label pairs to store a code but show a label (e.g. 1:Active, 0:Off). |
No control chosen? A column created with a fixed list of values (an ENUM such as
draft, published, archived) becomes a dropdown of exactly those values automatically, and the first
option is pre-filled from the column's default when you leave it blank. Lookup options always keep the order you
set (for example, alphabetical by name) in every dropdown and type-ahead.
Display as — how it looks
| Display | Best for |
|---|---|
| Dropdown | Long lists (countries), or when space is tight. Turn on Multiple to select several (stored comma-separated). |
| Radio group | A few mutually-exclusive options you want visible at a glance — gender, yes/no. Lay out vertically or horizontally. |
| Checkboxes | Choosing several at once — interests, tags. Always multiple; stored comma-separated. |
| Type-ahead | Very large tables — the user types and matches load live. Optionally allow free text not in the list. |
Styling — make it look the way you want
Every choice control (and Dropdown, Button Toggle, Switch, Star Rating…) shares one consistent set of Style options in the same Field Controls panel. Set them once and they apply on every page.
| Option | What it does | Applies to |
|---|---|---|
| Colour | The accent colour of the selected option / dot / pill (Primary, Success, Danger, …). | All choice controls |
| Size | S / M / L. Small is now a genuinely compact, tighter list. | All |
| Full width | Stretch the group across the row (options spaced out) instead of hugging the left. | Radio, Checkbox, Button Toggle |
| Option style | plain = classic dots/boxes · boxed = bordered selectable cards · button = pill buttons (the dot hides, the chosen pill fills with the colour). | Radio group, Checkbox group |
| Group frame | A container around the whole set. Label above: none · box (square border) · rounded · card (rounded + soft shadow) · list (divided rows, iOS-style). Label ON the border (an outlined field, like a Material text field): outline (rounded) · outline-sq (square) — the field label becomes a legend notched into the border, options inside. | Radio group, Checkbox group |
| Layout | Inline (in a row) or Stacked (one per line). | Radio, Checkbox |
| Variant · Height · Shape | For the Dropdown select: a plain themed field or a coloured button, its height, and rounded corners. | Dropdown, Lookup Wizard |
| State | Render the control disabled (read-only, dimmed). | All |
Each control only shows the style options that make sense for it — e.g. no “rounded” on round radio buttons, no “full width” on a fixed switch. The panel lays everything out in a tidy two-column grid, so the options stay compact and easy to scan.
Built-in preset lists
Ready-made lists you can drop onto any field — no table to create. Each stores a small numeric id
and shows the friendly name.
| Preset | Values |
|---|---|
| Countries | 196, ISO 3166 A→Z (name, 2-/3-letter code, calling code). Choose what to store: id (default), ISO code, name or calling code. |
| Gender | Male / Female / Other |
| Marital status | Single / Married / Divorced / Widowed / Separated |
| Salutation / Title | Mr / Mrs / Ms / Miss / Dr / Prof |
| Blood group | A+, A−, B+, … O− |
| Yes / No | A simple Yes / No pair |
| Days of the week | Sunday → Saturday |
| Months | January → December |
| Year (dynamic) | A range of 4-digit years around the current year. Set Years before and Years after — e.g. before 4 / after 1 shows 2022 … 2027 today — and a Sort order (Ascending = oldest first, or Descending = newest first, handy for a birth year). Either bound can be negative to shift that edge across this year: after −1 stops at last year for a past-only list (2022 … 2025), and before −1 starts next year for a future-only list. The list recomputes every time the form loads, so it never goes stale, and the field stores the year itself. |
Because the Year list is anchored to “now”, it is offered only as a choice-control preset — not as a seedable reference table (a fixed snapshot would drift out of date).
Worked examples
Gender as radio buttons. Field Controls → Edit → Lookup Wizard → Values from =
Preset, Preset list = Gender, Display as = Radio. The form shows
three radios; the field stores 1/2/3 and the list shows “Male”.
Country as a searchable dropdown. Values from = Preset → Countries,
Display as = Dropdown. Stores the country id; shows the name everywhere.
Interests as checkboxes. Values from = Manual,
Manual options = Sports, Music, Travel, Reading, Display as = Checkboxes.
Stores the chosen labels comma-separated.
Customer picker on a large table. Values from = Table =
customers, key id, display name, Display as = Type-ahead.
What is stored vs. what the reader sees
A choice field almost always stores a small code (an id) and shows a name.
That name follows the value automatically — on the List and View pages, in Print/PDF and exports, and in the
filter dropdown — you never have to map it yourself. Because the stored value is a discrete code, the list
filter becomes a proper value picker (with a search box and per-value counts) that matches
exactly — filtering “Male” never accidentally matches “Female”.
Reference tables — fetch any column later
When you store a numeric id against a real table, that one value can fetch any column later
— a country id gives you its name, ISO code and calling code by a simple join. To create the standard tables in
one click, open Tables → New from template → Reference data and pick Countries, Gender or Marital
status; each is created with a single INT id primary key already filled in. Then point a field’s Lookup
Wizard at it (Values from = Table).
Tips
- Change the look anytime. Switching a field between dropdown, radio and checkboxes is just the Display as setting — the stored data and the list/filter behaviour are unchanged.
- Cascading dropdowns. On a Table source, set a Parent field so one field filters another
(Country → State → City). See SQL Variables for
:field.name. - Add on the fly. On a Table source, enable the + / ✎ buttons to add or edit lookup values in a popup without leaving the form.
- Show the code instead of the name. Set Show on list & view = value if you really want the raw stored id/code on those pages.
- Country → State/City that switch tables. Use the Conditional Lookup edit
control: a Controller field (e.g. Country) and one rule per value picks a different source table
(Nepal →
nepal_states_districts, US →us_states…). Put it on the dependent field, not the controller; the “When controller =” value is a dropdown of the controller’s real values so you can’t mistype it. - A second level — District of the chosen State. On that same Conditional Lookup, set
Then filter by = the parent field (e.g. State) and, per rule, a Filter column = the column in that
table that holds the parent’s value (e.g.
state_number). No SQL — it builds the filter for you and reloads live when the parent changes. (Advanced: you can still type a rawWHEREusing:field.<name>to read another field on the form.) Match the column to what the parent field STORES (its id/key), not the label it shows.
The other input controls, feature-packed too
The same Field Controls panel customises the rest of the inputs:
| Control | Options |
|---|---|
| Text Box | Placeholder · max length · a leading/trailing add-on (a unit like kg, a symbol like $, or a Bootstrap icon such as bi-at) · text transform (UPPER / lower / Capitalize). |
| Text Area | Rows · placeholder · max length with a live character counter · auto-grow (expands to fit). |
| Password | Placeholder · an optional show/hide reveal button. |
| Colour Picker | Preset swatches (your own hex list, a starter palette, or none) · a clear button. |
| Range Slider | Min / max / step · a unit shown after the live value (e.g. %) · show/hide the value. |
| Star Rating · Switch | Colour, size and state like every other control (stars keep their gold default). |
Date & Time — choose how a timestamp is shown
Everything above sets the Edit control (how a value is entered). A field also has a View control — how the stored value is displayed on the list, view, print, PDF and export. For a date / datetime / timestamp column, the Date & Time view control gives you one place to pick from many patterns — including date-and-time together and human-friendly forms the built-in Long / Medium / Short Date controls don’t cover.
| Group | Patterns (example) |
|---|---|
| Date & time | Long (January 5, 2026 at 3:45 PM) · medium (Jan 5, 2026, 3:45 PM) · short · full (weekday + seconds) · 24-hour · ISO (2026-01-05 15:45). |
| Date only | Long · medium · short (1/5/2026) · padded · day/month/year · ISO (2026-01-05) · weekday · month & year. |
| Time only | 12-hour (3:45 PM) · 24-hour (15:45) · with seconds. |
| Human | Relative (2 hours ago, in 3 days, just now) · Today / Yesterday at 3:45 PM · calendar (names weekdays within a week). |
| Technical | ISO 8601 · RFC 2822 · Unix timestamp · weekday name. |
| Custom | Any PHP date() format you type — e.g. D, d M Y — H:i → Mon, 05 Jan 2026 — 15:45. |
The picker shows a live example beside every pattern, so you choose by sight. It is timezone-aware
(your app clock), safe on empty values, and — unless you turn it off — wraps the output in a semantic
<time> tag whose hover tooltip reveals the exact date and time (handy for a relative label like
“2 hours ago”). The chosen pattern applies everywhere the field is shown: list, view, print, PDF and export.
Signature — capture a hand-drawn sign-off
The Signature (draw) edit control turns a field into a draw-to-sign pad — for consent, approvals, delivery receipts and agreements. It works with a mouse, a finger or a stylus, stays crisp on high-resolution screens, and re-draws an existing signature when you reopen the record. The stored value is a PNG image, so the paired Signature view control shows it wherever the field appears — list, view, print, PDF and export.
| Setting | What it does |
|---|---|
| Height | Pad height in pixels (60–600). |
| Pen colour · width | Ink colour (hex) and stroke thickness (1–8). |
| Background | Transparent (default) or White — white bakes a solid background into the saved PNG, best for printing / PDF. |
| Show “Clear” | A button to wipe the pad and start again. |
| Prompt text | The faint “Sign here” hint shown on an empty pad. |
| View side: Max height and Border control how the saved signature is displayed. | |
VARCHAR, which would truncate it. Only what the person draws is captured; it is never a real identity document.Formula — a field that calculates itself
The Formula (calculated) edit control makes a field a read-only value computed from other columns in the same record — a line total, a full name, a flag. It previews live as you type in the form, and the server recomputes it authoritatively on every save (full form, inline edit and spreadsheet), so the stored value can never be faked from the browser. Because it is a real column, the result is sortable and filterable; pair it with a Number / Currency / Percent view control for display formatting.
Reference other columns as {column}. Combine them with + − * / %, comparisons
(== != < <= > >=) and text in "quotes". Functions available:
round abs ceil floor sqrt min max sum avg if concat upper lower trim len coalesce number.
| Goal | Formula |
|---|---|
| Line total, 2 decimals | round({qty} * {price}, 2) |
| Total with tax | round({qty} * {price} * (1 + {tax}), 2) |
| Full name | concat({first_name}, " ", {last_name}) |
| Tiered label | if({score} >= 40, "Pass", "Fail") |
| Fallback value | coalesce({nickname}, {full_name}) |
Optional Decimal places rounds the numeric result; a Prefix / Suffix
dress the live preview (e.g. $, %).
concat results. The expression is evaluated by a safe parser (no code execution); anything it can’t parse simply yields a blank value rather than an error.Address / Location — capture a place
The Address / Location edit control captures a place as an address, map coordinates, or both, all in one field. A “Use my location” button fills the latitude and longitude from the visitor’s own browser (it asks their permission first), and an “Open in map” link hands the place off to their map app. It is completely self-contained — no map tiles, no third-party geocoder, nothing loaded from the internet — so a generated app keeps working offline and leaks nothing. The paired Address / Location view control shows the address (and coordinates) with a small map icon wherever the field appears — list, view, print, PDF and export.
| Setting | What it does |
|---|---|
| Capture | Address, Coordinates, or Both — which parts to collect. |
| “Use my location” button | Fills the coordinates from the browser’s geolocation (with the visitor’s consent). |
| Map link | The provider the “Open in map” link uses — OpenStreetMap, Google Maps, or None. The link is always built from the data, never from anything stored, so it is safe. |
| Address placeholder | The faint hint shown in the empty address box. |
| View side: Map link picks the same provider for the small map icon (or turns it off). | |
The value is stored as a compact JSON object — {"address":"…","lat":…,"lng":…} — so the
address and coordinates travel together and can be read back later. A plain address typed into an older text field still
displays correctly.
See also: Add & Edit pages · SQL Variables