Portal Community

The 7 Media and Advanced Control Types

video

Embed a video player with native HTML5 controls. Supports MP4, WebM, and external streaming URLs.

audio

Inline audio player with play/pause, volume, and seek. Supports MP3, WAV, OGG.

iframe-viewer

Embed any external URL inside a sandboxed iframe. Configurable sandbox policy.

pdf-viewer

Render a PDF document inline using the browser's native PDF engine.

variable-inspector

Developer tool — displays all current form values and context as formatted JSON. Hide in production.

article

Long-form content block with full markdown support. Ideal for help text, policies, and instructions.

mermaid-diagram

Renders Mermaid.js markup as SVG. Supports flowcharts, sequence diagrams, Gantt charts, and more.

Common Properties

PropertyTypeDescription
idstringUnique control identifier
typestringControl type name (see above)
labelstringOptional label rendered above the control
widthstringfull, half, third, quarter, two-thirds
modeVisibilitySettingsobjectPer-mode visibility flags
visibilityRulestringExpression-based conditional visibility
settingsobjectControl-specific configuration

Security Considerations

Media controls embed external content inside your form. Apply the least-privilege principle:

ControlKey Security SettingRecommendation
iframe-viewersandboxAlways specify the minimum required sandbox permissions. Default: scripts and forms blocked.
pdf-viewersrcOnly load PDFs from trusted origins. Avoid user-supplied URLs without server-side validation.
video / audiosrcUse signed URLs for private media. Never expose raw S3 URLs in production.
articleMarkdown contentContent is sanitised before render. Do not bypass sanitisation with raw HTML in markdown.
mermaid-diagramcontentMermaid markup is safe — it renders SVG with no script execution.

Performance Considerations

Embedding media increases form load time. Follow these guidelines:

Developer-Only Controls

The variable-inspector control is intended for development and debugging only. Always configure it to be hidden in production modes:

{
  "id": "debug-inspector",
  "type": "variable-inspector",
  "modeVisibilitySettings": {
    "edit":    false,
    "view":    false,
    "admin":   false,
    "preview": false,
    "design":  true
  }
}