Atlas Forms
Operating Modes
Atlas Forms has five operating modes that change how a form is rendered and what controls are shown. The mode is passed as a prop to FormRenderer and propagated throughout the entire control tree. Controls can opt in/out of individual modes using modeVisibilitySettings.
The Five Modes
| Mode | String Value | Purpose | Controls State |
|---|---|---|---|
| Edit | "edit" | Data entry — user fills in the form | Interactive — all input controls are enabled |
| View | "view" | Read-only record display — user reviews data | Display-only — inputs rendered as formatted text |
| Design | "design" | Studio form builder — developer configures the schema | Design overlay — drag handles, property panels |
| Admin | "admin" | Administrative use — additional fields visible to administrators | Interactive — same as edit but admin-only fields visible |
| Preview | "preview" | Studio preview — simulate how the form looks in edit mode | Interactive but submit is blocked |
How Modes Change Rendering
edit mode
- All input controls are interactive.
- Validation runs on blur and on submit.
- Draft auto-save is active (if
draftEnabled). - Action bar shows submit button and any configured actions.
- Controls with
modeVisibilitySettings.edit: falseare hidden.
view mode
- Inputs are replaced by their display representation (text, formatted values).
- Validation does not run.
- Submit button is hidden — action bar may show read-only actions (export, print).
- Draft auto-save is disabled.
- Controls with
modeVisibilitySettings.view: falseare hidden.
admin mode
- Same as edit mode, but admin-only fields (marked
modeVisibilitySettings.admin: true, edit: false) are also visible. - Useful for support staff needing additional fields not shown to regular users.
preview mode
- Simulates edit mode visually — inputs are interactive.
- Submit action is intercepted — form does not actually submit.
- Validation runs but submission is blocked.
- Used by Atlas Forms Studio to preview form behaviour during design.
design mode
- Managed entirely by Atlas Forms Studio — not typically used directly by developers.
- Adds drag-and-drop handles, control selection overlays, and property panels.
modeVisibilitySettings on a Control
// Show in admin and design only — hidden from regular users in edit and view
{
"id": "internal-notes",
"type": "textarea",
"label": "Internal Notes (Admin Only)",
"modeVisibilitySettings": {
"edit": false,
"view": false,
"admin": true,
"preview": false,
"design": true
}
}
// Visible only in view mode — shown after submission as a confirmation field
{
"id": "submission-reference",
"type": "label",
"modeVisibilitySettings": {
"edit": false,
"view": true,
"admin": true,
"preview": false,
"design": true
}
}
Switching Modes at Runtime
// Track mode in parent component state and pass to FormRenderer
const [mode, setMode] = useState<FormMode>('view');
return (
<div>
<button onClick={() => setMode('edit')}>Edit Record</button>
<button onClick={() => setMode('view')}>Cancel</button>
<FormRenderer
schema={schema}
initialValues={record}
mode={mode}
onSubmit={handleSave}
/>
</div>
);
View Mode for Approval Forms
HIL (Human-In-Loop) approval forms typically open in
view mode for the approver to review the submission, with admin-mode fields visible only to compliance officers. Use mode switching to transition between view (review) and edit (decision entry) within the same form instance.