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

# Lead Form

Collect qualified leads right inside the conversation. The Lead Form action lets your AI Agent present a form in chat, collect user's information, and save them as a contact.

Any contacts saved by the AI agent will be displayed in the `Contacts` page in your dashboard.

<img src="https://chatling-assets.b-cdn.net/lead-form-chat-widget.jpg" width="300" alt="Lead form in chat widget" />

## Configuration

Below are the configuration options for the Lead Form action:

### `Mandatory`

Determines whether the form submission is mandatory. When enabled, the user will be required to submit the form before they can continue.

If the option is disabled, an "X" button will be displayed in the form to allow the user to dismiss the form.

<img src="https://chatling-assets.b-cdn.net/lead-form-dismiss-button.png" width="300" alt="Lead form dismiss button" />

### `Fields`

Add and configure the fields you want to include in the form. You can add multiple fields and specify whether they must be required.

<img src="https://chatling-assets.b-cdn.net/lead-form-action-field-configuration.jpg" width="400" alt="Add and configure fields" />

To reorder, grab the drag handle on the left of a field and move it up or down.

<img src="https://chatling-assets.b-cdn.net/lead-form-action-reorder-field.jpg" width="400" alt="Reorder field" />

### `When to Use`

A detailed description of when the AI agent should use this action.

<img src="https://chatling-assets.b-cdn.net/lead-form-action-when-to-use-option.jpg" width="400" alt="When to Use option" />

### `Customize Text`

You can customize the text to be displayed for the submit button and success message.

The success message is the message that is displayed after the form is submitted. It is optional and can be disabled.
