# Creating form templates

**URL:** https://meta.discourse.org/t/creating-form-templates/397564
**Category:** Site Management
**Tags:** form-templates
**Created:** [March 4, 2026, 6:54pm UTC](https://meta.discourse.org/t/creating-form-templates/397564 "2026-03-04T18:54:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lindsey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lindsey/32/318210_2.png) [@lindsey](https://meta.discourse.org/u/lindsey)
#### Post date: [March 4, 2026, 6:54pm UTC](https://meta.discourse.org/t/creating-form-templates/397564/1 "2026-03-04T18:54:21Z")

</div>

> :bookmark: This guide explains how to use form templates for structuring content in Discourse.
> 
> :person_raising_hand: Required user level: Administrator

**Form templates** let you create structured forms with validation rules that users can fill out when creating topics so you can ensure users provide all the information you want or need to support them, such as for bug reports, feature requests, etc.

> **Note:** For templates that function more like guidelines instead of a structured form, consider using [topic templates.](https://meta.discourse.org/t/using-topic-templates-for-categories/38295)

## Enabling form templates

You can turn on form templates in **[Upcoming changes](https://meta.discourse.org/t/upcoming-changes/395390)** by setting **Enable form templates** to “Everyone”.

 ![upcoming-changes-enable-form-templates](https://global.discourse-cdn.com/meta/original/4X/d/8/8/d88594aa6dd335831510256b3e657208e12b3e4e.png)

## Creating form templates

You can create and manage form templates by going to **Admin \> Appearance \> Form templates** (`/admin/customize/form-templates`).

To create a form template:

1. Click New Template.

 ![form-templates-new-template](https://global.discourse-cdn.com/meta/original/4X/2/d/a/2da5ec115147119a912ea1cd1c6661c6f1b6fc51.png)

1. Update the **Template Name** field with an internal name for your template.

2. Use the buttons at the top of the page to the various fields on your form and update the field attributes (detailed below). Many of the options are standard form field types (e.g., checkbox, short answer, dropdown, etc.), but there are a few specific fields:

3. Add any desired validations to your inputs. Click the Validation button for a key (also displayed below).

4. Click the Preview button to make sure everything looks right.

5. Click Save.

 ![form-templates-create-form](https://global.discourse-cdn.com/meta/original/4X/d/a/9/da94eaf0273713a59db5fa5829d4b9ed53dfba1d.png)

### Field attributes

**Common attributes for all field types:**

- `label`: The visible field name
- `placeholder`: Helper text shown in empty fields (input, textarea, dropdown, multi-select)
- `description`: Additional context or instructions displayed below the field.

**Upload-specific attributes:**

- `file_types`: Comma-separated list of allowed file extensions (e.g., `.jpg`, `.png`, `.pdf`)
- `allow_multiple`: Boolean indicating whether users can upload multiple files

**Dropdown and multi-select attributes:**

- `none_label`: Text shown when no option is selected
- `choices`: Array of available options

**Tag Group selector attributes:**

- `tag_group`: (top-level field property) The name of the tag group to populate choices from
- `none_label`: Text shown when no option is selected
- `multiple`: Boolean indicating whether users can select multiple tags (default scaffold sets this to `true`)

### Validation options

| Key | Type | Description |
| --- | --- | --- |
| `required` | boolean | Requires the field to be completed to submit the form. |
| `minimum` | integer | For text fields, specifies the minimum number of characters allowed. |
| `maximum` | integer | For text fields, specifies the maximum number of characters allowed. |
| `pattern` | regex; string | For text fields, a regular expression specifying the allowed input. |
| `type` | string | For input fields, you can specify the type of input that should be expected (`text`, `email`, `date`, `number`, `url`, `tel`, `color`, `password`) |

## Adding form templates to a category

After creating a template:

1. Navigate to the category where you want to use the template.
2. Click the :wrench: button to edit the category.

 ![form-templates-edit-category](https://global.discourse-cdn.com/meta/original/4X/9/9/c/99ca4b4954a54d066dd3ad8f62a18fc69f7f8cc4.png)

1. Toggle the **Advanced settings** button (if using the new [simplified category design](https://meta.discourse.org/t/simplified-category-setup/394971)).
2. Go to the **Template** tab.
3. Turn on the **Form template** toggle.
4. Select the form template in the drop-down menu.
5. Click Save category.

 ![form-templates-category](https://global.discourse-cdn.com/meta/original/4X/4/0/1/4015f6a7c76e820cf32536bc46dd6f71118748f9.png)

When multiple templates are assigned to a category, users will see a template picker when creating topics.

## Member Experience

### Creating topics with form templates

When a member creates a topic in a category with form templates, the form automatically appears in the composer. If multiple templates are applied to the same category, members can choose the right template from a drop-down. If users try to create a topic without accurately populating each field, they’ll see a validation error.

 ![form-templates-member-experience](https://global.discourse-cdn.com/meta/original/4X/e/c/2/ec22dc50071f0b84ec1b13a277980f310059bbc2.png)

### Pre-filling form values

Form fields can be pre-populated using URL parameters that match field IDs. For example: `/new-topic?software-version=2.4.1&severity=Critical`

This is useful for linking to topic creation with certain fields already filled.

---

<div class="post-metadata">

### Author: ![Eingang](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eingang/32/98491_2.png) [@Eingang](https://meta.discourse.org/u/Eingang)
#### Post date: [March 11, 2026, 12:26am UTC](https://meta.discourse.org/t/creating-form-templates/397564/6 "2026-03-11T00:26:57Z")

</div>

What do the regex patterns look like and what flavour of regex is expected? I tried the following and they all passed, but I wasn’t expecting them to:

- `2[6-9][0-1][0-9][0-3][0-9]` with an entry of `180918`;
- `/2[6-9][0-1][0-9][0-3][0-9]/` with an entry of `180918`;
- `/2[6-9][0-1][0-9][0-3][0-9]/` with an entry of `12`;

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [May 5, 2026, 10:27pm UTC](https://meta.discourse.org/t/creating-form-templates/397564/7 "2026-05-05T22:27:49Z")

</div>

10 posts were split to a new topic: [Adding paste functionality to form composer fields](https://meta.discourse.org/t/adding-paste-functionality-to-form-composer-fields/402250)
