Atlas Forms
modeVisibilitySettings
modeVisibilitySettings is an optional object on each form control that specifies whether the control is visible in each of the five operating modes: edit, view, design, admin, and preview. Omitting the property means the control is visible in all modes.
Type Definition
// packages/types-js/src/form.types.ts
interface ModeVisibilitySettings {
edit?: boolean; // Visible when mode = 'edit'
view?: boolean; // Visible when mode = 'view'
design?: boolean; // Visible when mode = 'design'
admin?: boolean; // Visible when mode = 'admin'
preview?: boolean; // Visible when mode = 'preview'
}
// On FormControl:
interface FormControl {
// ...
modeVisibilitySettings?: ModeVisibilitySettings;
}
Examples
// Show ONLY in admin mode (e.g., internal audit fields)
{
"id": "internal-notes",
"type": "textarea",
"modeVisibilitySettings": {
"edit": false,
"view": false,
"design": false,
"admin": true,
"preview": false
}
}
// Show in edit and view, hide in preview (editing controls irrelevant in preview)
{
"id": "price-override",
"type": "number",
"modeVisibilitySettings": {
"edit": true,
"view": true,
"design": true,
"admin": true,
"preview": false
}
}
// Developer diagnostic control — hide in all user-facing modes
{
"id": "debug-inspector",
"type": "variable-inspector",
"modeVisibilitySettings": {
"edit": false,
"view": false,
"design": true, // visible only in design mode for developers
"admin": false,
"preview": false
}
}
The Five Modes
| Mode | Purpose | Typical Audience |
|---|---|---|
edit | User fills in the form — controls are interactive | End users, workflow participants |
view | Read-only display of submitted data | Reviewers, supervisors |
design | Form schema editor in Atlas Forms Studio | Form authors, developers |
admin | Administrative override view — may show extra internal fields | Platform administrators |
preview | Preview a form before publishing — simulated user view | Form authors checking layout |
Partial Specification
You only need to specify modes where the behaviour differs from the default. Any mode you omit defaults to visible:
// Omitting a mode = visible in that mode
// This is equivalent to specifying all modes as true:
{
"modeVisibilitySettings": {
"preview": false // Only hide in preview; visible in all other modes
}
}
Use Partial Specification to Minimise Noise
Only specify the modes where you want to deviate from the default (visible). Specifying all five flags explicitly makes the schema harder to read. A setting like
{ "admin": true } alone is meaningless — it defaults to true. Only specify "admin": true when you have also specified other modes as false.