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

# Form Actions

> Let your bot show a form inside the chat to collect details, then save them and send them to your webhook.

A form action lets your bot show a short form right inside the chat. The visitor
fills it in – name, email, a message – and submits without leaving the
conversation. A dental clinic might add an "Open a support ticket" form, or a
SaaS app a "Book a demo" form.

When the visitor submits, two things happen: Chatref **saves the entry** so you
can read it later, **and** sends it to a **webhook URL** you choose, so it can
land in your own tools.

## What you configure

* **Form title and description** – a heading and a line of context shown above
  the fields.
* **Fields** – the inputs the visitor fills in (see below).
* **Submit Button Text** – the label on the submit button, e.g. "Send request".
* **Webhook URL** – where Chatref sends the submission.
* **Headers** (optional) – extra header keys and values your endpoint needs,
  such as an auth token.
* **Retries** (optional) – how many times Chatref retries if the webhook fails.

Each field has its own settings:

| Field setting   | What it does                                  |
| --------------- | --------------------------------------------- |
| **Name**        | The internal key for the value (e.g. `email`) |
| **Label**       | What the visitor sees (e.g. "Your email")     |
| **Type**        | The kind of input – see the table below       |
| **Required**    | Whether the visitor must fill it in           |
| **Placeholder** | Faint hint text inside the field              |

## Supported field types

| Type         | What it collects                                          |
| ------------ | --------------------------------------------------------- |
| **text**     | A single line of text – names, short answers              |
| **email**    | An email address, checked for valid format                |
| **tel**      | A phone number                                            |
| **number**   | A numeric value – quantity, order number                  |
| **textarea** | A longer, multi-line message                              |
| **select**   | A drop-down – you must add the **options** to choose from |
| **date**     | A date, picked from a calendar                            |

<Note>
  A **select** field needs at least one option. Add the choices when you set up
  the field, or the drop-down will be empty.
</Note>

## Create a form action

<Steps>
  <Step title="Open the Actions tab">
    In your agent's dashboard, go to the **Actions** tab and create a new action.
  </Step>

  <Step title="Choose Form">
    Pick **Form** as the action type.
  </Step>

  <Step title="Name it and describe when to use it">
    Give the action a clear name like "Book a demo", and a description that tells
    the AI when to fire it – for example, "Use this when a visitor wants to book
    a demo."
  </Step>

  <Step title="Add your fields">
    Click **Add Field** for each input. Set its **Name**, **Label**, **Type**,
    and whether it's **Required**. For a demo form you might add Name (text),
    Work email (email), and Preferred date (date).
  </Step>

  <Step title="Set the submit button and webhook">
    Enter the **Submit Button Text**, then the **Webhook URL** where submissions
    should go. Add any **Headers** and a **Retries** count if your endpoint needs
    them.
  </Step>

  <Step title="Save">
    Save the action. Your bot can now show this form whenever the conversation
    matches your description.
  </Step>
</Steps>

<Tip>
  Offer a form at the right moment – usually after the bot has answered the
  visitor's first questions and they want to follow up with your team. The clearer
  your description, the better the AI's timing.
</Tip>

## Seeing submissions

Every form submission is saved in the **Action Submissions** table – see
[Custom Actions](/custom-actions/overview) for how to read it.

## Next steps

<CardGroup cols={2}>
  <Card title="Custom Actions" icon="bolt" href="/custom-actions/overview">
    How actions work and the three types.
  </Card>

  <Card title="Button action" icon="square-mouse-pointer" href="/custom-actions/button-actions">
    Add a one-tap button instead of a form.
  </Card>

  <Card title="API / Webhook action" icon="webhook" href="/custom-actions/api-webhook-actions">
    Let the bot call your API directly.
  </Card>

  <Card title="Inbox" icon="inbox" href="/inbox/conversations">
    Read the chats where the form was shown.
  </Card>
</CardGroup>
