---
title: Contact form
description: Add a contact form and receive replies in the chat widget.
icon: Mail
---

The contact form sends messages to your inbox. Each submission starts a new conversation with the **Form** label.
Customers read replies in the chat widget. Coristen does not send form replies by email.

## Before you start

[Install the package](/installation). Use the same API key for the form and chat widget.
Keep a chat widget available on the same website.

## Add the form

```tsx title="components/contact.tsx"
"use client"

import { CoristenContactForm, CoristenWidget } from "@coristen/widget"
import "@coristen/widget/styles.css"

const apiKey = process.env.NEXT_PUBLIC_CORISTEN_KEY!

export default function Contact() {
  return (
    <>
      <CoristenContactForm apiKey={apiKey} />
      <CoristenWidget apiKey={apiKey} />
    </>
  )
}
```

If your layout already has a chat widget, add only `CoristenContactForm` to the contact page.
Put the form on the page where customers must contact your team.

For signed-in customers, use the same `identity` route for both components.
Do not supply `apiKey` with `identity`.

## Set the form appearance

1. In Coristen, open **Experiences > Contact form**.
2. Set the **Title**.
3. Set the **Description**.
4. Set the **Button label**.
5. Enter the **Topics**. Separate choices with commas.
6. Select the **Theme** and **Corner radius**.
7. Set **Powered by Coristen** to show or hide the footer.

Use up to eight topics. Leave the topic list empty to hide it. Customers can leave the topic unselected.

Coristen saves each change. Use the **Contact form** switch to enable or disable the form.
These settings do not change the live chat appearance.

## Fields

| Field   | Required | Limit                        |
| ------- | -------- | ---------------------------- |
| Name    | Yes      | 100 characters               |
| Email   | Yes      | 254 characters               |
| Topic   | No       | One topic choice             |
| Message | Yes      | 1,800 characters in the form |

The name and email identify the customer. A topic appears before the message in the conversation.
Verified identity data takes priority over form data.

## Read and answer replies

1. Send the form.
2. Open the chat widget on the same website.
3. Open the conversation history.
4. Select the form conversation.
5. Read the reply.
6. Send your next message in chat.

Anonymous customers must use the same browser. An email address alone does not give access to an earlier conversation.
Signed-in customers use their verified account identity.

## Submission results

After a successful submission, the form shows **Message sent**.
Select **Send another** to send a new form message.
If a submission fails, the form keeps the data. Correct the problem and send the form again.
