@maxhealth.tech/prefab / auto / AutoFormField
Interface: AutoFormField
Defined in: auto/form.ts:31
One field in an auto-generated form.
The same definition drives both delivery paths: autoForm renders it as prefab components, and formSchema in src/mcp/input-required.ts derives the restricted elicitation JSON Schema from it for hosts with no UI surface. Keep anything added here expressible in both.
Properties
name
name: string;Defined in: auto/form.ts:33
Field name (used as the key in submitted data).
label?
optional label?: string;Defined in: auto/form.ts:35
Display label. Defaults to humanized name.
type?
optional type?: string;Defined in: auto/form.ts:37
Input type: 'text', 'email', 'number', 'password', 'url', etc.
placeholder?
optional placeholder?: string;Defined in: auto/form.ts:39
Placeholder text.
required?
optional required?: boolean;Defined in: auto/form.ts:41
Whether the field is required.
description?
optional description?: string;Defined in: auto/form.ts:43
Longer help text. Becomes the schema description on the elicitation path.
options?
optional options?: AutoFormOption[];Defined in: auto/form.ts:45
Fixed set of choices. Renders as a Select and becomes an enum on the wire.
multiple?
optional multiple?: boolean;Defined in: auto/form.ts:47
Allow several choices. Only meaningful alongside options.
min?
optional min?: number;Defined in: auto/form.ts:49
Inclusive lower bound for a numeric field, or minimum length for a string.
max?
optional max?: number;Defined in: auto/form.ts:51
Inclusive upper bound for a numeric field, or maximum length for a string.
default?
optional default?: string | number | boolean | string[];Defined in: auto/form.ts:53
Pre-filled value.