For the complete documentation index, see llms.txt. This page is also available as Markdown.

Schema

The schema contains the fields of the form, optionally in groups.

Examples

Simple form without groups

This simple form will have a text input for Name and a numeric input for Age.

{ 
    fields: [
        {
            type: "input",
            inputType: "text",
            label: "Name",
            model: "name"
        },
        {
            type: "input",
            inputType: "number",
            id: "current_age",
            label: "Age",
            model: "age"
        }
    ]
}

Simple form with groups

This form will have two sections:

  • A "User Details" section, with a text input for username and an email input

  • A "Preferences" section, with a select input for color and a numeric input for timeout

Sections are currently output as <fieldset> elements, with a <legend>.

It is also possible to have a schema with some fields grouped and some ungrouped:

This form would have a text input for Name, followed by a fieldset for "User Details", containing a numeric input for Age.

Note: any ungrouped fields will be output first, followed by any groups.

Available field types

Last updated

Was this helpful?