BotWiz Documentation
DashboardSupport ServerResources
BotWiz Documentation
BotWiz Documentation
  • Welcome to BotWiz!
  • Support Server
  • Dashboard
    • Get Started
    • Settings
    • BotWiz Guides
  • Creations
    • Commands
      • Builder
    • Events
      • List of Discord Events
    • Variables
      • Interaction & Default Variables
      • Custom Variables
        • Bot Variables
      • Unique Variables
      • Function Variables
      • Advanced Variables
      • Event Variables
  • Misc
    • Debugging
    • Exports
  • Blocks
    • Actions
      • Message Actions
        • Modal / Form
        • Send & Edit a Message
        • Delete & Pin a Message
        • Start & End Poll
      • Role Actions
        • Removing & Adding a Role to Everyone
        • Edit a Role
      • Channel Actions
        • Create Channel
        • Edit Channel
        • Delete Channel
        • Purge Messages
      • Member Actions
        • Ban Member
        • Kick Member
        • Member Nickname
        • Timeout Member
        • Unban Member
      • Variable Actions
        • Calculate Variable
        • Delete Variable
        • Set Variable
      • Action Blocks
        • API
        • Create & Delete an Auto Mod Rule
        • Timed & Custom Event
    • Conditions
    • Options
Powered by GitBook
On this page
  • Creating your Modal
  • Custom IDs & Field Identifiers
  • Creating Fields
  • Optional Components

Was this helpful?

  1. Blocks
  2. Actions
  3. Message Actions

Modal / Form

PreviousMessage ActionsNextSend & Edit a Message

Last updated 6 months ago

Was this helpful?

Modal action blocks allow you to send a form to the interacting user, letting you find answers to the questions you ask. Useful for systems such as a modmail, or ticket system, modals will enable users to enter anything they'd like.

To start creating your modal, you can place a modal action block in any builder. However, modal blocks can only be placed after an interaction. Interactions are where a user has interacted with an event of command, such as:

  1. When a command has been run (modal blocks will not work at the start of an event); or

  2. When a trigger (e.g., button or select menu) as been used.

Modal blocks do not have to be placed directly after an interaction. Other blocks such as a condition block may be used inbetween. Though, if you place an action block (e.g., a send message block) after an interaction, the modal will not work.

Creating your Modal

In every modal block, you can use our modal builder to start creating your form. In this builder, you can edit your modal's settings at the left-hand-side, whereas the right-hand-side will have a live representation of your modal, and how it will look on Discord.

For each modal you create, you must enter a title, custom ID and at least one question. As shown in the example above, a modal title will appear at the top of the form, and each question has eight customisable options.

For each modal, only five questions can be created, as per Discord limitations.

Custom IDs & Field Identifiers

As mentioned, for every modal you must enter a custom ID. Custom IDs are a way to differentiate your current modal against other modals you may have in your builder. This is essential, as you may wish to use a modal variable to refer back to a user's answer.

Modal variables are a variable specific to each modal you create, and they can be used for referring to a user's answer to any question. Using the example image above, you can view the modal variable called {modal_example_question}. If I used that variable in my builder, it will return the answer a user has given for the question.

Field identifiers, similar to custom IDs, differentiate a modal's questions. For example, a modal with multiple questions will need numerous unique field identifiers so that you can refer to a user's answer to one, or more, questions.

In the example above, the field identifiers 1 and 2 has been used to represent the question number. With these identifiers, I can use {modal_example_1} to return the user's answer to the first question, and {modal_example_2} to show the next answer for question 2.

Creating Fields

Fields are your questions; for each field you create, you create a new question. With each field, you will have eight customisable options, allowing you to create intricate questions. However, every question requires you to enter a label, type and field identifier.

Labels are simply the question title, and the field type will distinguish whether you would like a short answer or a long answer. These are all you require to successfully create a modal question! However, the other optional components will let you customise your question a bit more.

Optional Components

These components are entirely optional, and are not required to be filled in when creating a new field.

Component
Description

Placeholder

Text visible before an answer has been given; usually added for guidance.

Minimum Length

Set a minimum number of characters that must be entered.

Maximum Length

Set the maximum amount of characters a user can use in their answer.

Required

Toggle whether the question must be answered or not.

Default Value

Set a default answer for a question. These can be edited by the user.

Placeholders vs Default Values

Placeholders are only visible when a user has not yet entered an answer. These can be used to aid a user into providing an appropriate answer, or to explain the question further.

However, default values are where you would automatically answer the question for the user. These values can be edited, but will be useful for pre-answering a question or starting off an answer.

With a modal, users using your command will experience a form like this.
The modal builder for the form sent at the start of this page.