Skip to content

formio/ai / plugin/skills/formio-form

formio-form

Verified

Embed and render Form.io forms in any web app with the `@formio/js` renderer — by URL or JSON, pre-filled, controlled from JavaScript — and own field behavior: conditionals, calculated values, JSON Logic validation, cascading selects. The default "embed a form" entry point. Use when the user asks to "embed a form", "render a form", "add this form to my page", "pre-fill a form", "show or hide a field based on another field", "calculate a field value", "add custom validation to a field", or add conditional wizard pages — field behavior in ANY framework's form stays here. Not for: Angular (see `formio-angular`) or React-named (see `formio-react`) embedding; building an app (see `formio-application`) or its data model (see `formio-resource-planner`); REST endpoints (see `formio-api`); the raw SDK (see `formio-sdk`); creating a new form (see `formio-form-builder`); agent-filled forms or chats (see `formio-uag`).

references/options.md

View on GitHub
# Form Renderer Options

## Overview

The third argument to `Formio.createForm` is an options object that changes how the form renders and behaves:

```js
const form = await Formio.createForm(el, srcOrJson, {
  readOnly: true,
  noAlerts: true,
});
```

## Core options

| Option | Effect |
| --- | --- |
| `readOnly` | Renders the whole form non-editable — every component is disabled. The standard "view a submission" mode; pair with a submission URL from [rendering.md](./rendering.md). |
| `noAlerts` | Suppresses the alert box the renderer normally injects above the form on validation failure; errors still attach to the individual components. Use when your app renders its own error UI from the `error` event. |
| `hooks` | Lifecycle interception points. `beforeSubmit(submission, next)` is the common one — mutate or validate the submission, then call `next()` to continue or `next(error)` to abort. |
| `i18n` | Translation dictionary keyed by language code; combine with `language` to pick the active one. |
| `sanitizeConfig` | Passed through to DOMPurify when the renderer sanitizes HTML content (labels, HTML components). Use `addTags`/`addAttr` to allow markup the default policy strips. |

## Combined example

```js
const form = await Formio.createForm(el, 'https://myproject.form.io/myform', {
  readOnly: false,
  noAlerts: true,
  hooks: {
    beforeSubmit: (submission, next) => {
      submission.data.submittedAt = new Date().toISOString();
      next();
    },
  },
  i18n: {
    es: { 'First Name': 'Nombre' },
  },
  language: 'es',
});
```

## Opt-in: allow embedded iframes

The default sanitizer removes `<iframe>` elements from labels and HTML/Content components. Add this only on a form whose own content embeds an iframe:

```js
const form = await Formio.createForm(el, 'https://myproject.form.io/myform', {
  sanitizeConfig: {
    addTags: ['iframe'],
    addAttr: ['allow'],
  },
});
```

## Other options worth knowing

- `language` — active translation key into `i18n`.
- `template` / `templates` — override individual render templates.
- `buttonSettings` — wizard button visibility (`showPrevious`, `showNext`, `showCancel`, `showSubmit`); see [wizards.md](./wizards.md).
- `breadcrumbSettings` — wizard breadcrumb behavior; see [wizards.md](./wizards.md).

Options apply per-instance. There is no global options registry — pass them on every `createForm` call that needs them.

## See also

- [rendering.md](./rendering.md) — the `createForm` signature.
- [javascript-api.md](./javascript-api.md) — the `error` event `noAlerts` defers to.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall