# Form Content Packs

> Source: https://openwop.dev/spec/v2/core/form-content-packs.html · OpenWOP, the open-source protocol for multi-agent workflow orchestration. CC BY 4.0.

> **Status: Stable.**
> **Normative home:** `forms`.

## Why this exists

A form-content pack ships declarative form templates a host renders in its own chrome. The manifest is `schemas/v2/form-content-pack-manifest.schema.json`; installation and signing follow [packs.md](https://openwop.dev/spec/v2/core/packs.html).

## Conditional visibility

A field MAY carry `when: <EdgeCondition>`. The grammar is the `WorkflowEdge.condition` object `{ type, left, right }` of `schemas/v2/workflow-definition.schema.json`, with the operator set of [workflow-chain-packs.md §"Edge conditions"](https://openwop.dev/spec/v2/core/workflow-chain-packs.html). A host MUST evaluate `when` with its edge-condition semantics and MUST NOT accept any other expression language for visibility.

```jsonc
{ "id": "region", "type": "select", "label": "Region",
  "when": { "type": "equals", "left": "fields.shipping", "right": "international" } }
```

## Instantiation

A form instantiated from a pack advertised through `forms.contentPacks` MUST be created through the same path a hand-authored form uses, and MUST remain editable afterwards: the pack is a starting point, not a managed object.

- A host MUST degrade an unrecognized field type to plain text rather than failing the instantiation.
- A host MUST NOT execute anything carried by the pack.
- A pack-authored string, and any value collected through an instantiated template, is untrusted input. When one is interpolated into a prompt, the composition MUST record `contentTrust: "untrusted"` ([host-services.md](https://openwop.dev/spec/v2/core/host-services.html) §Composition), so a downstream reader can tell authored text from pack-supplied text.

## Localized strings

`label`, `title`, and `description` are localized strings. A host MUST select the rendered language by the locale-selection and fallback rules of [i18n.md](https://openwop.dev/spec/v2/core/i18n.html), and MUST treat every rendered string as untrusted: escaped for the target surface, never interpreted as markup, script, or a template directive.

## Validation

| Constraint | Applies to | Rule |
| --- | --- | --- |
| `required` | any type | the value MUST be present |
| `format` | `text`, `longtext` | one of `email`, `uri`, `date`, `date-time`, `time`, or `x-<format>` |
| `minLength` | `text`, `longtext` | a host MUST reject a shorter value |
| `min`, `max` | `number` | a host MUST reject a value outside the closed range |
| `pattern` | `text`, `longtext` | a host MUST reject a non-matching value |

The five spec-reserved `format` values are the core set. A host that recognizes a format SHOULD apply it; one that does not MUST ignore it and accept plain text. A host MUST ignore `format` on any type other than `text` or `longtext`.

*Sources: RFCs 0137, 0177.*
