> For the complete documentation index, see [llms.txt](https://help.form.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.form.io/form-building/form-json.md).

# Form JSON

Form JSON is the schema automatically created by the Form Builder.

Every component added through the Form Builder is added to the JSON Schema behind the Form. It records every component, that component's settings and customizations, as well as how that component is organizared or structured within the form.

The JSON Schema is then used in several ways:

* **Rendering** the forms within a website/application .
* **Generating** the **REST** **API** interfaces on the server.
* Hosting the form's JSON schema at the **Embed** **URL.**

An example of a form and the resulting JSON is included below:

#### Form

<figure><img src="/files/aj9yh9qWW8HjtsuS0w16" alt=""><figcaption></figcaption></figure>

#### Resulting JSON

```json
{
  "title": "Race Registration",
  "name": "raceRegistration",
  "path": "raceregistration",
  "type": "form",
  "display": "form",
  "components": [
    {
      "title": "Entrant Info",
      "collapsible": false,
      "key": "entrantInfo",
      "type": "panel",
      "label": "Panel",
      "input": false,
      "components": [
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "First Name",
                  "applyMaskOn": "change",
                  "validate": {
                    "required": true
                  },
                  "validateWhenHidden": false,
                  "key": "firstName",
                  "type": "textfield",
                  "input": true
                }
              ],
              "width": 6,
              "size": "md",
              "currentWidth": 6
            },
            {
              "components": [
                {
                  "label": "Last Name",
                  "applyMaskOn": "change",
                  "validate": {
                    "required": true
                  },
                  "validateWhenHidden": false,
                  "key": "lastName",
                  "type": "textfield",
                  "input": true
                }
              ],
              "width": 6,
              "offset": 0,
              "size": "md",
              "currentWidth": 6
            }
          ],
          "key": "columns",
          "type": "columns",
          "input": false,
          "tableView": false
        },
        {
          "label": "Age",
          "applyMaskOn": "change",
          "mask": false,
          "tableView": false,
          "delimiter": false,
          "requireDecimal": false,
          "inputFormat": "plain",
          "truncateMultipleSpaces": false,
          "validateWhenHidden": false,
          "key": "age",
          "attributes": {
            "size": "4"
          },
          "type": "number",
          "input": true
        },
        {
          "label": "Email Address",
          "applyMaskOn": "change",
          "tableView": true,
          "validate": {
            "required": true
          },
          "validateWhenHidden": false,
          "key": "emailAddress",
          "type": "email",
          "input": true
        },
        {
          "label": "Phone Number",
          "applyMaskOn": "change",
          "tableView": true,
          "validateWhenHidden": false,
          "key": "phoneNumber",
          "type": "phoneNumber",
          "input": true
        }
      ]
    },
    {
      "type": "button",
      "label": "Submit",
      "key": "submit",
      "disableOnInvalid": true,
      "input": true,
      "tableView": false
    }
  ],
  },
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.form.io/form-building/form-json.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
