# Chat forms: collect details in one step

> Build short forms of up to 20 fields, such as a quote request or a return, that the agent shows under its reply when they fit. Submissions go to the Leads tab, email, Slack, webhooks and a webhook of the form's own.

A chat form collects a few details in one go, such as what a visitor needs a quote for, or an order number and the reason for a return, instead of the agent asking question by question. You build the form on the **Actions** tab. The agent decides when to show it. The fields are always the ones you set.

## Create a form

1. On the **Actions** tab, go to **Forms** below your actions and click **Add form**.
2. Fill in the fields:
   - **Name**: shown to visitors as the form's title. Up to 60 characters.
   - **When to show it**: read by the agent, not shown to visitors. Describe the moments the form helps, in up to 1,000 characters. For example: "When the visitor asks for a price for a custom order, or wants a quote for several items."
   - **Fields**: what the form asks, up to 20 fields. Each has a **Label** of up to 60 characters, a **Type** and a **Required** checkbox. Two fields can't have the same label. Use the arrows to change the order.
   - **Button text**: optional, up to 30 characters. Left empty, visitors see "Send" in their own language.
   - **Message after sending**: optional, up to 300 characters. Left empty, visitors see a short thank-you in their own language.
3. Keep **Agent can show this form** on, check the **Preview** and click **Add form**.

| Type | What the visitor enters |
|---|---|
| **Short text** | Up to 200 characters |
| **Long text** | Up to 2,000 characters |
| **Email** | An email address, checked before sending |
| **Phone** | A phone number of up to 30 characters, checked before sending |
| **Number** | A number such as `12` or `12.5`, also with a comma |
| **Date** | A date, picked in a date field |
| **Dropdown** | One of your choices. Enter one choice per line, up to 20 choices of up to 60 characters each. |

Visitors see your name, labels, choices, button text and message exactly as you write them, so write them in your visitors' language. The rest of the form, such as "(optional)", error messages, the default "Send" and the default thank-you, follows the **Widget language** on the [Appearance](/en/docs/appearance) tab.

## Manage your forms

Each form in the list shows a **Form** badge, the number of fields and the number of submissions.

- The **Enabled** switch stops the agent from offering the form, without deleting it. A form that was already shown in a chat then says "This form is no longer available."
- **Edit** opens the form. Renaming or removing a field keeps the answers visitors already sent. A form that is shown again in a chat, for example after a reload, shows your current version.
- The trash button deletes the form and all its submissions. This can't be undone, so export the submissions from the **Leads** tab first if you want to keep them.

An agent can have up to 10 forms. Forms don't count toward the limit of 25 actions.

## When the agent shows a form

The agent reads **When to show it** for each enabled form. When the conversation fits, it shows the form under its reply and mentions it in a short sentence. It doesn't ask for the same details in the chat.

- The form is built from the form you saved. The AI model only decides when to show it, never what it asks.
- The agent shows at most one form under a reply.
- No form appears under a reply that already shows the [lead form](/en/docs/lead-collection) because one of your rules triggered it.
- Forms aren't shown in temporary chats, because nothing in them is saved. The agent asks the visitor to go back to their saved conversation instead.

Forms appear in the chat bubble, the inline iframe, the direct link, the [Help Page](/en/docs/help-page) and the **Playground**. They are saved with the reply, so they also show in transcripts on the **Conversations** tab, and **Why this answer** lists them under **Actions called** as "Form".

## What visitors do

The visitor fills in the form under the reply and clicks the button. Required fields and email, phone, number and date answers are checked before the form is sent. Afterwards the form shows your **Message after sending**.

Each form can be sent once per conversation. After that it shows as sent, also when the visitor reloads the page.

## Submissions on the Leads tab

On the **Leads** tab, the **Form submissions** card lists what visitors sent. Choose a form under **Form** to see its submissions, newest first, 20 per page, with the answers and a link to the conversation.

- **Refresh** loads new submissions.
- **Export CSV** downloads up to 10,000 of the newest submissions of the chosen form. The file has the columns `Submitted at (UTC)`, one column per field with its current label, in the form's order, and `Conversation ID`. A field you removed gets a column after them when a submission answered it. Answers that start with `=`, `+`, `-` or `@` get a leading apostrophe, so spreadsheet apps don't read them as formulas.
- The trash button deletes one submission. Webhooks and emails already sent aren't affected.

> Submissions are kept apart from leads. An email address in a form doesn't add a lead, and it doesn't send a new-lead alert or a `lead.created` webhook.

## Notifications

- **Email**: each submission is emailed to the recipients of your [lead alerts](/en/docs/lead-alerts-and-export), but only while **Email when a new lead arrives** is on. The subject is `New "` followed by the form name, `" form from` and the agent name. The email lists the answers and the time, with a **See the conversation** button. If the form has an email field, replying goes to the address the visitor entered. Each agent sends at most 30 form emails per hour, separate from the lead alerts; submissions beyond that are still saved.
- **Slack**: tick **Form submission** under **Post a message for** in the **Slack alerts** card. See [Slack alerts](/en/docs/lead-alerts-and-export).
- **Webhooks**: subscribe a webhook to **Form submitted** to receive the `form.submitted` event with the answers of every form. See [Webhooks](/en/docs/webhooks).
- **The form's own webhook**: send just this form's submissions to one address; see below.

## A webhook for one form

Each form can have one webhook of its own, for example to send quote requests to your CRM and return requests to your shop system. It receives only this form's submissions.

1. On the **Actions** tab, click **Edit** on a saved form. **Webhook for this form** is at the bottom of the editor. A new form gets it once you've added it.
2. In **Endpoint URL**, paste the address your server or tool gives you for incoming webhooks and click **Add webhook**. The address must start with `https://` and point to a public server, as for the agent's webhooks.
3. Copy the signing secret that appears, store it where your receiver can read it, and click **I've saved it**. It is shown in full only this once.
4. Click **Send test event** to check the connection.

The panel saves on its own, apart from the form. Its **Active** switch pauses deliveries, **Save address** changes the address, **New secret** replaces the secret, **Remove** deletes the webhook and its delivery history, and **Recent deliveries** shows the last 20 deliveries with a **Resend** button for failed ones. The form list shows "own webhook" next to a form that has one.

- It sends the `form.submitted` event, with the same payload, signature, retries and delivery log as the agent's [webhooks](/en/docs/webhooks). Its events can't be changed.
- It doesn't count toward the agent's 5 webhooks and isn't listed in the **Webhooks** card on the **Leads** tab.
- The agent's own webhooks that subscribe to **Form submitted** still get the submissions of every form, this one included. To send a form's submissions only to its own webhook, untick **Form submitted** on the agent's webhooks.
- Deleting the form deletes its webhook too. A [duplicated agent](/en/docs/quick-start) gets copies of the forms without their webhooks.
- Adding or removing the webhook, changing its address and creating a new secret need the **Admin** role or the account owner; editors can switch it on or off and send a test event. See [Team](/en/docs/team).

## Duplicating an agent

A [duplicated agent](/en/docs/quick-start) gets copies of the forms, without the forms' own webhooks. The submissions stay with the original agent.

> The agent decides mainly from **When to show it**. If it shows the form too often or never, describe the moments more precisely and try again in the Playground.
