# Website Forms: Turn Form Submissions Into Tickets in Robylon

Build a form, embed it on your website, and turn every submission into an email ticket in Robylon, with fields mapped to ticket properties.

> Source: https://www.robylon.ai/docs/integrations/website-forms
> Section: Integrations

A website form sits on a page of your site, and every submission creates an email ticket in Robylon. Use it for contact, support or callback forms, so requests land in the same inbox as your email tickets.

Open website forms from **Settings → Integrations → Forms**. These forms are not shown in the chatbot. To collect details inside a chat, use [chatbot forms](https://www.robylon.ai/docs/chatbot/forms) instead.

## How do I create a website form?

Add fields, set the labels and the mailbox tickets go to, then embed the form on your site.

<Steps>
  <Step title="Create the form">
    Go to **Settings → Integrations → Forms** and click **Create Form**.
  </Step>
  <Step title="Add fields on the General tab">
    Enter a **Form name**, then add fields. Every form starts with a required **Email** field so Robylon knows who to reply to.
  </Step>
  <Step title="Set labels and delivery on the Settings tab">
    Set what the customer sees and where tickets come from. See [what you can set](#what-can-i-set-on-a-website-form).
  </Step>
  <Step title="Save and embed">
    Click **Save form**, then copy the code from the **Embed code** tab onto your website.
  </Step>
</Steps>

## Which fields can a website form have?

Each field has a **Field label**, optional **Help text**, a **Field Source**, an optional **Validation type** (for example Email), and a **Mark as Required** switch.

| Field Source | What it means |
| --- | --- |
| **Linked to property** | The answer is saved to a ticket property you choose. |
| **Standalone** | The answer is captured as it is, with no mapping to a property. |

Under **Default Properties** you can set ticket property values that apply to every ticket created from the form. If a ticket property is mandatory for email tickets, the form must either include it as a field or give it a default.

## What can I set on a website form?

| Setting | What it does |
| --- | --- |
| **Form title** and **Form description** | Shown to the customer above the form. |
| **Submit button label** | The text on the submit button. The default is "Submit". |
| **Success message** | Shown after submission. Put `{{ticket_id}}` in the message to show the new ticket's ID. |
| **Internal Email** | The support mailbox the ticket is created in. |
| **Do you want to mail the customer who filled the form?** | Sends the customer an email about their new ticket. |
| **Allowed domains** | The domains, subdomain suffixes (starting with a dot) or exact page URLs where the form may be embedded. Wildcards are not allowed. `localhost` is treated as a test environment. |

The **Appearance** tab (colours, fonts and button style) is marked coming soon.

## How do I embed a website form?

Add the loader script before the closing `</body>` tag, then place the form's `div` where the form should appear:

```html
<script src="https://cdn.robylon.ai/forms/embed/latest/embed-loader.js" async></script>

<div data-robylon-form="YOUR_FORM_ID"></div>
```

Copy the exact code from the **Embed code** tab, which fills in your form ID.

If your site uses a Content Security Policy, allow `https://cdn.robylon.ai` in `script-src` and `https://api.robylon.ai` in `connect-src`.

For how tickets are handled once created, see [Tickets](https://www.robylon.ai/docs/inbox/tickets).
