Portal Community

Omitting the Property

// No modeVisibilitySettings at all — visible in all five modes
{
  "id":   "first-name",
  "type": "text",
  "label": "First Name"
  // modeVisibilitySettings omitted → visible in edit, view, design, admin, preview
}

Omitting Individual Mode Flags

// Only 'preview' is false — all other modes default to true (visible)
{
  "id":   "email",
  "type": "email",
  "label": "Email Address",
  "modeVisibilitySettings": {
    "preview": false   // hidden in preview
    // edit, view, design, admin all default to true → visible
  }
}

Effective Visibility Table

modeVisibilitySettingseditviewdesignadminpreview
Omitted entirelytruetruetruetruetrue
{} (empty object)truetruetruetruetrue
{ preview: false }truetruetruetruefalse
{ edit: true, view: false }truefalsetruetruetrue
{ edit: false, view: false, preview: false }falsefalsetruetruefalse

The Opt-In-to-Hiding Philosophy

Defaults to visible is intentional. When you add a new control to a form, it works immediately in all modes without any extra configuration. You only need to configure modeVisibilitySettings when you want to deviate from universal visibility. This keeps simple forms simple.

parseSchema Normalisation

When parseSchema() processes a control, it fills in any missing mode flags with true — so the engine always works with a fully-specified object internally:

// Input schema (as authored):
{ "modeVisibilitySettings": { "preview": false } }

// After parseSchema() normalisation (internal representation):
{
  "modeVisibilitySettings": {
    "edit":    true,
    "view":    true,
    "design":  true,
    "admin":   true,
    "preview": false
  }
}

// Your code in a custom player can always safely read any mode flag:
const isVisibleInEdit = control.modeVisibilitySettings?.edit ?? true;
// → true (because parseSchema filled it in)
Design Mode Always Visible by Default Controls default to visible in design mode even when you hide them in other modes. This allows form authors to see and configure all controls in Studio. If you want a control to be invisible even in design mode, explicitly set "design": false.