Portal Community

The Five Modes

ModeString ValuePurposeControls State
Edit"edit"Data entry — user fills in the formInteractive — all input controls are enabled
View"view"Read-only record display — user reviews dataDisplay-only — inputs rendered as formatted text
Design"design"Studio form builder — developer configures the schemaDesign overlay — drag handles, property panels
Admin"admin"Administrative use — additional fields visible to administratorsInteractive — same as edit but admin-only fields visible
Preview"preview"Studio preview — simulate how the form looks in edit modeInteractive but submit is blocked

How Modes Change Rendering

edit mode

view mode

admin mode

preview mode

design mode

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.