New Topic template form, like GitHub Issue templates?

AI-generated summary

The discussion revolves around the desire for a GitHub-style issue template feature in Discourse, allowing custom New Topic forms with fields like inputs, dropdowns, and checkboxes, defined via YAML. mksafi proposes a feature similar to GitHub’s issue forms, highlighting the limitations of current Category Templates. merefield points to existing solutions like placeholder forms and the Custom Wizard plugin, which sunjam also mentions. However, mksafi notes that the Custom Wizard plugin lacks key features like preview and suggested topics. Falco directs attention to experimental form templates, suggesting a potential path forward.

Discourse currently has the Category Template feature, which prefills the Composer. It’s useful, but a nice step up from that could be to have the ability to create a custom New Topic form, with custom fields, driven by a YAML definition, like the one exists for GitHub Issues.

So something like this…

name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug", "triage"]
assignees:
  - octocat
body:
  - type: markdown
    attributes:
      value: |
        Thanks for taking the time to fill out this bug report!
  - type: input
    id: contact
    attributes:
      label: Contact Details
      description: How can we get in touch with you if we need more info?
      placeholder: ex. email@example.com
    validations:
      required: false
  - type: textarea
    id: what-happened
    attributes:
      label: What happened?
      description: Also tell us, what did you expect to happen?
      placeholder: Tell us what you see!
      value: "A bug happened!"
    validations:
      required: true
  - type: dropdown
    id: version
    attributes:
      label: Version
      description: What version of our software are you running?
      options:
        - 1.0.2 (Default)
        - 1.0.3 (Edge)
    validations:
      required: true
  - type: dropdown
    id: browsers
    attributes:
      label: What browsers are you seeing the problem on?
      multiple: true
      options:
        - Firefox
        - Chrome
        - Safari
        - Microsoft Edge
  - type: textarea
    id: logs
    attributes:
      label: Relevant log output
      description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
      render: shell
  - type: checkboxes
    id: terms
    attributes:
      label: Code of Conduct
      description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com)
      options:
        - label: I agree to follow this project's Code of Conduct
          required: true

Translates to something like this…

A much more basic version of this that only supports one field type (i.e. textarea) would still be a very good improvement over the current Category Templates, though!

There is this already, any help?:

What about Custom Wizard plugin for this.

In my experience, the Custom Wizard plugin is not a good solution for this use case. You lose the preview, the suggested topics pop-up, and a few other things. Something that replaces the Composer partially while retaining the overall flow and experience would be a better solution here.

Check Introducing Form Templates