Skip to content
Content
Skill

/form-model

Building forms with the FormModel system — field types, renderers, layout, validation, conditional rules, computed fields, and dynamic zones. Use this skill when the developer needs to define form fields with the builder API, choose renderers, build layouts with

From plugin
webiny-js
8.1k79 skills3 MCP

Claude Code

$ npx -y skills add webiny/webiny-js --skill form-model --agent claude-code

SKILL.md

form-model.SKILL.md
name: webiny-form-model
description: >
  Building forms with the FormModel system — field types, renderers, layout, validation,
  conditional rules, computed fields, and dynamic zones. Use this skill when the developer
  needs to define form fields with the builder API, choose renderers, build layouts with
  tabs/rows/separators, add validation (Zod or imperative), use conditional visibility/disable
  rules, create computed fields, or work with object fields and templates (dynamic zones).

Form Model

TL;DR

The Form Model is Webiny's declarative form system. Define fields with a fluent builder API (`fields.text()`, `fields.datetime()`, etc.), arrange them with a layout builder (`layout.row()`, `layout.tabs()`, etc.), and validate with Zod schemas or imperative rules. Fields support conditional visibility, computed values, reactive context from other fields (`.context()`), and deeply nested object/list structures with templates (dynamic zones).

Field Types

All fields are created via the `fields` registry callback. Each builder method returns a chainable builder.

Text

fields.text();

Default renderer: `textInput`. Value: `string | null`.

fields.text().label("Title").placeholder("Enter title").required("Title is required")
fields.text().renderer("textarea", { rows: 4 })
fields.text().list().renderer("tags").defaultValue([])
fields.text().list().renderer("textInputs", { addItemLabel: "Add text" })
fields.text().list().renderer("textareas", { addItemLabel: "Add description" })
fields.text().renderer("codeEditor", { language: "html", height: 300 })
fields.text().options([
    { label: "Option A", value: "a" },
    { label: "Option B", value: "b" }
])  // auto-switches to "select" renderer
fields.text().options([...]).renderer("radioButtons")
fields.text().list().options([...]).renderer("checkboxes")

// Dynamic options — callback receives { field, form }, re-evaluated reactively
fields.text().options(({ form }) => {
    const type = form.field("general.type").getValue();
    return getOptionsForType(type);
})

Number

fields.number();

Default renderer: `numberInput`. Value: `number | null`. Auto-normalizes to number.

fields.number().label("Count").placeholder("0").required();
fields.number().list().renderer("numberInputs", { addItemLabel: "Add number" });
fields.number().options([
  { label: "Tier 1", value: 100 },
  { label: "Tier 2", value: 200 }
]);

Boolean

fields.boolean();

Default renderer: `switch`. Value: `boolean | null`.

fields.boolean().label("Featured").defaultValue(false);

DateTime

fields.datetime();

Default renderer: `dateTimeInput`. Pick a variant method to set the subtype:

| Variant | Value Format | Example | | ----------------------------------------- | ------------------------------ | -------------------------------------------------------------- | | `.dateOnly()` | `"2026-05-01"` | Holidays, due dates (birthdays: see the birthday picker below) | | `.timeOnly()` | `"14:30:00"` | Opening hours | | `.withTimezone()` | `"2026-05-01T14:30:00+02:00"` | Events tied to a locale | | `.withoutTimezone()` | `"2026-05-01T14:30:00.000Z"` | Timestamps, logs | | `.monthOnly()` | `"2026-05"` | Billing cycles | | `.weekOnly({ startsOn: 1 })` | `"2026-W18"` | Sprint planning | | `.yearOnly({ range: [2020, 2035] })` | `2026` (number) | Fiscal years | | `.dateRange()` | `{ from: "...", to: "..." }` | Vacation requests | | `.multipleDates()` | `["2026-05-01", "2026-05-03"]` | Blackout dates | | `.multipleMonths()` | `["2026-01", "2026-03"]` | Seasonal availability | | `.multipleYears({ range: [2020, 2035] })` | `[2024, 2025, 2026]` | Multi-year budgets |

Additional chainable methods:

.presets([
    { label: "Today", value: () => new Date() },
    { label: "In a week", value: () => addDays(new Date(), 7) }
])
.displayFormat("dd/MM/yyyy")  // date-fns format tokens
.list()  // switches renderer to "dateTimeInputs"
.dateGte("2026-01-01", "message?")  // value must be on or after
.dateLte({ expression: "today-18y" }, "message?")  // value must be on or before

`.dateGte()` and `.dateLte()` take a fixed value, or, on a date-only field, `{ expression }` worked out from the editor's local date every time the field is checked. An expression is `today`, or `today` plus or minus a number of days (`d`), months (`m`) or years (`y`): `"today-18y"`, `"today+1d"`. The limits survive a later `.renderer()` or `.schema()` call, and the check runs after the field's own schema. In the message, `{date}` is the limit in the admin's date format; without a message, the field says "Must be on or after {date}." or "Must be on or before {date}.".

For dates far in the past, like a date of birth, a date-only field can use the `birthdayInput` renderer, a step-by-step picker (day, then month, then year). It stores the same `"YYYY-MM-DD"` value as the calendar, and has no settings: it offers only the dates the field's `dateGte`/ `dateLte` limits allow (without limi

Read more
@webiny
Ships withwebiny-js

Open-source content platform. Self-hosted on AWS serverless. Built as a TypeScript framework you extend with code, not a closed product you configure through a UI. Runs on Lambda, DynamoDB, S3, and CloudFront inside your own AWS account. Scales automatically.

8.1k79 skills3 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
8.1k
Star history of webiny/webiny-js on GitHub, a chart by star-history.com

Other skills on webiny-js.

design-ask

design-ask

Turn open design questions into a paste-ready prompt for Claude Design, log them with Q-IDs and copy the prompt to the clipboard.…

@webiny@webinyInstall Skill
design-pull

design-pull

Pull a Claude Design project into a local, git-ignored design folder and keep a catalogue of what was pulled and implemented. Use…

@webiny@webinyInstall Skill
grill-me

grill-me

Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision…

@webiny@webinyInstall Skill
prd-to-plan

prd-to-plan

Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in…

@webiny@webinyInstall Skill
preflight

preflight

Webiny-only. Run all checks required before packages are ready for publish: deps, build, lint, format, tests.

@webiny@webinyInstall Skill
tester

tester

Use when running tests. Shows how to run tests for a single package, including OpenSearch (ddb-os) tests when applicable.

@webiny@webinyInstall Skill

More skills from other plugins.

prompt-lookup

prompt-lookup

Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use…

@gh-f@gh-fInstall Skill
ppt-master

ppt-master

AI-driven presentation workflow for generating editable PPTX decks and slides, reconstructing page visuals, creating reusable…

@hugohe3@hugohe3Install Skill
morph-ppt

morph-ppt

Use this skill when the user wants a .pptx with smooth cross-slide animation — PowerPoint Morph transitions, Keynote-style…

@iofficeai@iofficeaiInstall Skill

Questions about form-model.

Which coding agents can use form-model?
form-model installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.