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

# Forms

> Add intake questions to topics so members fill in details before a ticket opens.

# Forms

> Add intake questions to topics so members fill in details before a ticket opens.

## Form Rules

<CardGroup cols={2}>
  <Card title="Topic-Level" icon="layer-group">
    Forms are configured per topic. Each topic has its own independent set of fields.
  </Card>

  <Card title="One per Topic" icon="lock">
    A topic can have at most **5** fields. Fields can be individually toggled off without deleting them.
  </Card>

  <Card title="Answer Snapshots" icon="camera">
    Form answers submitted by the member are saved to the ticket record. Old tickets keep the exact answers from the time they were opened.
  </Card>

  <Card title="Modal Popup" icon="window-restore">
    When a topic has active fields, a popup appears before the ticket channel is created. The member must submit it to proceed.
  </Card>
</CardGroup>

## Form Limits

Due to Discord's constraints, the following limits apply:

* Up to `5` fields per topic.
* Each field label has a max length of `45` characters.
* Each text answer can be up to `1024` characters.
* All fields render inside the popup modal that appears when the topic is selected.

***

## Adding Fields

<Steps>
  <Step title="Add a field to a topic">
    ```bash theme={null} theme={null}
    ;ticket modal add (topic) (name) [description]
    ```

    `description` sets the placeholder hint shown inside the input box.
  </Step>

  <Step title="Set the field type">
    ```bash theme={null} theme={null}
    ;ticket modal type (topic) (name) (short_text|long_text)
    ```

    Defaults to `short_text`. See [Field Types](#field-types) for the difference.
  </Step>

  <Step title="Verify the form">
    ```bash theme={null} theme={null}
    ;ticket modal list
    ```

    Lists all fields across all topics.
  </Step>
</Steps>

***

## Managing Fields

<AccordionGroup>
  <Accordion title="Rename a field">
    ```bash theme={null} theme={null}
    ;ticket modal name (topic) (old) (new)
    ```
  </Accordion>

  <Accordion title="Edit placeholder text">
    ```bash theme={null} theme={null}
    ;ticket modal description (topic) (name) (text)
    ```

    The placeholder is the greyed-out hint shown inside the input before the member types.
  </Accordion>

  <Accordion title="Toggle a field on or off">
    ```bash theme={null} theme={null}
    ;ticket modal toggle (topic) (name)
    ```

    Disables the field without deleting it. Useful for temporarily hiding a question.
  </Accordion>

  <Accordion title="Remove a field">
    ```bash theme={null} theme={null}
    ;ticket modal remove (topic) (name)
    ```
  </Accordion>
</AccordionGroup>

***

## Field Types

Inline modal fields (`;ticket modal`) are **text-only** — `short_text` and `long_text`. The richer field types below belong to **reusable forms** (see [Reusable forms](#reusable-forms)) and are set with:

```bash theme={null} theme={null}
;ticket forms field add (form) (label) (key) (type) (required)
```

<AccordionGroup>
  <Accordion title="short_text — single-line input" icon="text-size">
    A single-line text box. Best for short answers like order numbers, usernames, or brief descriptions.

    ```bash theme={null} theme={null}
    ;ticket modal type support "Order Number" short_text
    ```
  </Accordion>

  <Accordion title="long_text — multi-line input" icon="align-left">
    A multi-line paragraph box. Best for longer explanations or issue descriptions.

    ```bash theme={null} theme={null}
    ;ticket modal type support "Describe your issue" long_text
    ```
  </Accordion>

  <Accordion title="checkbox — yes/no toggle" icon="square-check">
    A single checkbox the member can tick. The answer is recorded as yes/no.
  </Accordion>

  <Accordion title="select — dropdown choice" icon="list">
    A dropdown of preset options. Acts like radio buttons — the member picks one. Provide the options when configuring the field.
  </Accordion>

  <Accordion title="role_select — role picker" icon="at">
    The member selects a server **role**. The chosen role is saved with the ticket.
  </Accordion>

  <Accordion title="user_select — member picker" icon="user">
    The member selects a server **member**.
  </Accordion>

  <Accordion title="channel_select — channel picker" icon="hashtag">
    The member selects a **channel**.
  </Accordion>

  <Accordion title="checkbox_group — multi-select checkboxes" icon="list-check">
    A group of checkboxes where the member can tick several options. Set the choices on the [dashboard](https://raze.lat/@me/) — created from the command alone it starts with a placeholder option.
  </Accordion>

  <Accordion title="file_upload — file attachment" icon="paperclip">
    The member uploads one or more files as part of the form.
  </Accordion>
</AccordionGroup>

<Note>
  `select` and `checkbox_group` choices are set on the [dashboard](https://raze.lat/@me/). Every other type works fully from the command.
</Note>

***

## Reusable forms

Reusable forms are built once and attached to any number of topics — and they support every [field type](#field-types) above, unlike inline modal fields.

<Steps>
  <Step title="Create a form">
    ```bash theme={null} theme={null}
    ;ticket forms create (name)
    ```
  </Step>

  <Step title="Add fields">
    ```bash theme={null} theme={null}
    ;ticket forms field add (form) (label) (key) (type) (required)
    ```

    Example:

    ```bash theme={null} theme={null}
    ;ticket forms field add Feedback "Your Role" role role_select yes
    ```

    `type` is one of the field types above (defaults to `short_text`); `required` accepts `yes`/`no`.
  </Step>

  <Step title="Attach it to a topic">
    ```bash theme={null} theme={null}
    ;ticket forms attach (form) (topic)
    ```

    Detach later with `;ticket forms detach (topic)`.
  </Step>
</Steps>

Manage forms with `;ticket forms list`, `;ticket forms fields (form)`, `;ticket forms field remove (form) (key)`, `;ticket forms rename`, `;ticket forms title`, and `;ticket forms filtering`.

***

## Showing Answers in the Channel

```bash theme={null} theme={null}
;ticket topic formanswers (topic)
```

Toggles whether the submitted answers are posted inside the ticket when it opens. Enabled by default. Disabling this keeps answers in the database only — staff can still view them via ticket records.
