Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions docs/src/en/dashboard/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Each form supports a maximum of **5 fields**. Once you reach five, the "New Fiel

### Field Settings

Every field has the following settings:
Each field has the following settings, depending on its type:

| Setting | Description |
| ------- | ----------- |
Expand All @@ -51,6 +51,7 @@ Every field has the following settings:
| **Type** | The kind of input. See [Field Types](#field-types) below. |
| **Style** | For Text Input fields only: Single-line or Multi-line. |
| **Required** | Whether the user must fill in this field before submitting. |
| **Content** | For Text Display fields only: the text shown in the form. Required, maximum 4,000 characters. |
| **Length Range / Items Range** | Minimum and maximum character count (for text) or selection count (for select types). |

Fields can be reordered using the up and down arrow buttons, and deleted using the bin button.
Expand All @@ -67,6 +68,7 @@ Fields can be reordered using the up and down arrow buttons, and deleted using t
| **Channel Select** | A dropdown that lists server channels for the user to select. |
| **Radio Group** | A set of radio buttons where the user picks exactly one option (2 to 10 options). |
| **Checkbox Group** | A set of checkboxes where the user can select multiple options (1 to 10 options). |
| **Text Display** | Text shown in the form, such as instructions or rules. See [Text Display](#text-display) below. |

### Options for Select, Radio, and Checkbox Types

Expand All @@ -86,9 +88,23 @@ Radio Group requires at least 2 options, since a single radio button would serve

String Select fields can fetch their options dynamically from an external API instead of using a fixed list. Toggle **API Config** next to the Required toggle to reveal the API configuration. See the [API-based form inputs](/features/api-form-inputs) guide for full setup instructions.

### Text Display

Text Display fields let you add information above, between, or below the questions in a form. They only have the **Type** and **Content** settings, and they are not included in the user's answers.

A live preview is shown below the **Content** field. The Text Display fields in a form are limited to 4,000 characters in total.

:::tip Formatting
You can use [Discord message formatting](https://discord.com/developers/docs/reference#message-formatting) in the content, including bold, italic, lists, and links.
:::

:::info Forms Without Questions
If a form only contains Text Display fields, it is still shown when the user clicks the panel button. The ticket is created once they click **Submit**, and no answers are sent below the welcome message.
:::

## Saving Changes

After adding or editing fields, click **Save Changes** at the bottom of the page. The button is disabled if any field has validation errors (missing label, blank options, duplicate values, or an incomplete or invalid API configuration).
After adding or editing fields, click **Save Changes** at the bottom of the page. The button is disabled if any field has validation errors (missing label or content, blank options, duplicate values, or an incomplete or invalid API configuration).

## Cloning a Form

Expand Down
4 changes: 4 additions & 0 deletions docs/src/en/dashboard/settings/exit-survey.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ The next time a user rates a ticket on that panel, they will also be prompted to
## Viewing Responses

When a user submits a survey response, the archive message in your transcript channel is updated with a button to view their answers.

:::info Forms Without Questions
If the survey form only contains [Text Display](/dashboard/forms#text-display) fields, the user is still prompted to complete the survey. No responses are stored, so no button is added to the archive message.
:::
2 changes: 1 addition & 1 deletion docs/src/en/dashboard/ticket-panels.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Controls what happens to the mention message after it is sent:

### Form

Attach a form to this panel. When a user clicks the panel button, they are presented with the form to fill in before the ticket is created. Select "None" to open tickets without a form.
Attach a form to this panel. When a user clicks the panel button, they are presented with the form to fill in before the ticket is created. Their answers are sent in a separate embed below the welcome message. Select "None" to open tickets without a form.

[Learn more about forms](./forms).

Expand Down
2 changes: 1 addition & 1 deletion docs/src/en/integrations/building-integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ When the HTTP method is **POST**, Tickets sends a JSON body like:
| `ticket_id` | Numeric ticket ID |
| `ticket_channel_id` | String snowflake |
| `is_new_ticket` | Always `true` today (integrations run only when a ticket is opened) |
| `form_data` | Only for **non-public** integrations. Keys are form **question labels**, not internal field IDs |
| `form_data` | Only for **non-public** integrations. Keys are form **question labels**, not internal field IDs. [Text Display](/dashboard/forms#text-display) fields are not included |

Requests are sent through the [secure-proxy](https://github.com/TicketsBot-cloud/tickets.rs/tree/master/secure-proxy), not directly from the bot.

Expand Down
5 changes: 3 additions & 2 deletions docs/src/en/setup/onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ Forms collect information from users when they open a ticket. For example, you m

1. Enter a **form title** (e.g. "Support Request") and click **Create**.
2. Click **+ Add Field** to add questions to the form.
3. For each field, configure:
3. For each field, depending on its type, configure:
- **Label** - the question text shown to the user.
- **Type** - Text Input, String Select, User Select, Role Select, Mentionable Select, Channel Select, Radio Group, or Checkbox Group.
- **Type** - Text Input, String Select, User Select, Role Select, Mentionable Select, Channel Select, Radio Group, Checkbox Group, or Text Display.
- **Style** - for text inputs, choose between single-line or multi-line.
- **Required** - whether the user must fill in this field.
- **Content** - for text displays, enter the text shown in the form.
- **Length/Items Range** - minimum and maximum character count (for text) or selection count (for selects).
- **Options** - for select, radio, and checkbox types, add the choices the user can pick from.

Expand Down
Loading