> ## Documentation Index
> Fetch the complete documentation index at: https://agentheya.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# input_capture block

> A pre-chat intake form whose submission either auto-sends as the first chat message or pre-fills the chat input box.

# `input_capture` block

A structured form that collects information from the visitor *before* (or alongside) the chat. On submit, the form values are formatted as a multi-line message and either sent to the agent automatically or pre-filled into the chat input for the visitor to review.

## When to use it

* Triage / qualification: "What model do you have? What's the issue category?"
* Booking intake: "Name, email, preferred time".
* Sales lead routing: "Company size, use-case, timeline".

For a *one-click* start with no structured fields, use [suggested\_prompts](/sections/page-layout/suggested-prompts) instead — it's lighter weight and dovetails with the same chat-seeding plumbing.

## Shape

```json theme={null}
{
  "id": "intake-1",
  "type": "input_capture",
  "position": "above_chat",
  "heading": "Tell us about your device",
  "intro": "We'll use this to skip the basics.",
  "fields": [
    { "name": "model",      "label": "Device model", "type": "string", "required": true },
    { "name": "issue_area", "label": "Issue area",   "type": "enum",
      "options": ["setup", "wifi", "app", "warranty"], "required": true }
  ],
  "submit_label": "Start chat",
  "success_message": "Thanks — starting your chat.",
  "behavior": "send_as_message"
}
```

| Field                  | Required    | Type                                  | Notes                                                                       |
| ---------------------- | ----------- | ------------------------------------- | --------------------------------------------------------------------------- |
| `id`                   | yes         | string                                | Stable slug.                                                                |
| `type`                 | yes         | `"input_capture"`                     | Fixed.                                                                      |
| `position`             | no          | enum                                  | Default `above_chat`.                                                       |
| `heading`              | no          | string                                | Section title above the fields.                                             |
| `intro`                | no          | string                                | One-line subtitle.                                                          |
| `fields[]`             | no          | array                                 | The form fields.                                                            |
| `fields[].name`        | **yes**     | string                                | Snake\_case identifier. Appears in the formatted message as the field name. |
| `fields[].label`       | **yes**     | string                                | Human-readable label.                                                       |
| `fields[].type`        | **yes**     | enum                                  | `string` / `longtext` / `email` / `number` / `boolean` / `enum`.            |
| `fields[].required`    | no          | boolean                               | If true, blocks submit with a per-field error message.                      |
| `fields[].placeholder` | no          | string                                | Input placeholder.                                                          |
| `fields[].options`     | conditional | string\[]                             | Required when `type: "enum"`.                                               |
| `submit_label`         | no          | string                                | Button text. Defaults to "Submit".                                          |
| `success_message`      | no          | string                                | Shown in place of the form after submit.                                    |
| `behavior`             | no          | `send_as_message` / `append_to_input` | Default `send_as_message`.                                                  |

## Behaviour modes

* **`send_as_message`** — On submit, the formatted text is automatically sent as the visitor's first chat message and the agent responds. Use this for triage / qualification where the agent should react.
* **`append_to_input`** — On submit, the formatted text is dropped into the chat input box and the visitor can review / edit / add to it before clicking Send. Use this when the form is *partial context* rather than the visitor's whole question.

## Tips

* Keep the form short — 3–5 fields max. Long forms convert poorly compared to letting the agent ask one question at a time.
* For required-info gates (e.g. consent, region selection) you may prefer a [notice](/sections/page-layout/notice) banner that blocks engagement, then [suggested\_prompts](/sections/page-layout/suggested-prompts) — that's a softer pattern than a wall of form fields.
* The submitted text reaches the agent as `"<heading>:\n- <Label>: <value>\n- <Label>: <value>"`. The agent sees it like any other user message — your `rules`, `examples`, and memory schema apply.
* Schema enforcement: each `field` must have `name`, `label`, and `type`. `enum` fields must include non-empty `options`. Configurations that violate either constraint are rejected and not saved.
