What is a form?
A form is the screen end users fill in to add or edit a record. Every table in your app gets a default form automatically — you're here because you want to make it nicer.
A form belongs to a table. The table provides the columns; the form arranges them on the screen.
A form has three modes
The same form definition can render in three slightly different ways:
| Mode | Used when | What it looks like |
|---|---|---|
| Create | Adding a new record | Empty inputs, "Save" button |
| Edit | Changing an existing record | Inputs pre-filled with current values, "Save" button |
| Show | Read-only detail page | Labels and values, no inputs |
Every form has one default mode (create / edit / show). One table usually has three forms — one per mode. You can also build extra named forms for special cases.
A form is built from blocks
Each form is a stack of blocks. Block types:
- Section — a titled group of related fields (Applicant Details).
- Field — one input bound to a column.
- Heading — a sub-title between sections.
- Text — a paragraph of explanation.
- Alert — a warning / info box.
- Divider — a horizontal line.
- Columns — splits a row into 2 or 3 side-by-side cells.
You don't have to use sections, but for forms longer than ~5 fields it helps users follow.
Glossary
- Field block — bound to a real column on the table; produces an input.
- Layout block — section / heading / text / alert / divider; just visual structure, no data.
- Required — comes from the field's table definition. The form shows a red asterisk and refuses to save when blank.
- Read-only — the input shows the value but the user cannot change it. Useful for system-filled fields on edit forms.
Where to next
- Add fields and sections — step-by-step.
- Form layout — columns and sections — making forms readable.
- Form modes — create, edit, show — how to keep them in sync.
- Common mistakes.