formio/ai / plugin/skills/formio-form
formio-form
VerifiedEmbed 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`).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 15.4 KB |
| references/calculated-values.md | markdown | 1.8 KB |
| references/conditionals.md | markdown | 2.0 KB |
| references/external-data.md | markdown | 7.9 KB |
| references/field-logic.md | markdown | 4.0 KB |
| references/javascript-api.md | markdown | 3.6 KB |
| references/json-logic.md | markdown | 3.2 KB |
| references/options.md | markdown | 2.5 KB |
| references/rendering.md | markdown | 2.9 KB |
| references/setup.md | markdown | 5.0 KB |
| references/validation.md | markdown | 2.2 KB |
| references/wizards.md | markdown | 3.3 KB |
references/rendering.md
View on GitHub# Rendering Forms — URL, JSON, and Submissions
## Overview
One API renders everything:
```js
const form = await Formio.createForm(element, srcOrJson, options);
```
`srcOrJson` takes three shapes — a form URL, an inline form JSON definition, or a submission URL. The returned promise resolves to the form instance (a Webform/Wizard), which you keep to control the form afterward (see [javascript-api.md](./javascript-api.md)).
## Rendering by form URL
Point `createForm` at a form living under your project URL (`{projectUrl}/{formPath}`):
```js
const form = await Formio.createForm(
document.getElementById('formio'),
'https://myproject.form.io/myform'
);
```
When a URL is used the renderer also wires submission for you: pressing the Submit button POSTs the submission to that URL's `/submission` endpoint and emits `submitDone` on success.
## Rendering by form JSON
Pass the form definition object directly — no server round-trip. Useful for definitions fetched via the `form_get` MCP tool, stored locally, or generated at runtime:
```js
const form = await Formio.createForm(document.getElementById('formio'), {
display: 'form',
components: [
{
type: 'textfield',
key: 'firstName',
label: 'First Name',
input: true,
},
{
type: 'textfield',
key: 'lastName',
label: 'Last Name',
input: true,
},
{
type: 'button',
key: 'submit',
label: 'Submit',
action: 'submit',
input: true,
},
],
});
```
With inline JSON there is no server attached: `submit` is emitted locally and nothing is persisted unless you handle the event yourself (see [javascript-api.md](./javascript-api.md)).
## Rendering submissions (pre-fill)
Two ways to render a form with existing data.
### Set the submission after creation
```js
const form = await Formio.createForm(
document.getElementById('formio'),
'https://myproject.form.io/myform'
);
form.submission = {
data: {
firstName: 'Jane',
lastName: 'Doe',
},
};
```
The `submission` setter is asynchronous under the hood; when subsequent code depends on the values being applied, use the promise-returning equivalent:
```js
await form.setSubmission({
data: {
firstName: 'Jane',
lastName: 'Doe',
},
});
```
### Render from a submission URL
Point `createForm` at a specific submission and the renderer loads both the form and that submission's data:
```js
const form = await Formio.createForm(
document.getElementById('formio'),
'https://myproject.form.io/myform/submission/{submissionId}'
);
```
Submitting in this mode PUTs back to the same submission (an edit screen for free). Combine with `{ readOnly: true }` from [options.md](./options.md) for a view-only screen.
## See also
- [setup.md](./setup.md) — page prerequisites and URL configuration.
- [javascript-api.md](./javascript-api.md) — events and instance methods.
- [options.md](./options.md) — the `options` argument.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 471k | Updated | Claude CodeCodex | Verified | Install |
| 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: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |