Form / foldkit-form
Limits and guards from a metakit declaration
When your input Schema's rules are written with metakit,
foldkit-form/metakit reads them instead of you repeating them in the view.
Declared.of(form) gives each key the min, max, step and type its
bounds and domain type imply, and can(model, transition, state) says whether
a guarded transition would go through with what has been typed so far.
field(model, key) shows a rule over several keys beside each key it reads as
soon as the values break it.
Declared.inputs(schema) gives money and calendar days controls that read
them. See Take a form's limits and guards from its metakit declaration.
Limits
- Headless: draw forms with
foldkit-mixins-formor your own renderer overcontrols, and fetch relation picker options via a query (orfoldkit-crud). - Draft type safety:
Changedaccepts any draft value; drafts of the wrong type for a key are ignored rather than stored. - Struct values and row order: struct fields edit via
Relation.nestedorInput.bundle; nested rows keep insertion order without built-in reordering. - Bundle-backed controls: omit
OutMessage, command services, andcheckoptions; inside nested rows, omit Subscriptions and Resources.
Next
- Render forms with accessible slots and styles:
foldkit-mixins-form - Wire a form to load, save, and delete Remote records:
foldkit-crud - Understand how form errors and server refusals fit together: Errors and failures
- Take input limits and action guards from a metakit declaration: the metakit guide