Skip to Content
BuildcordDocs

Send a form

Open a modal and wait for the person's answers.

message.modal opens a modal over Discord and pauses the run until it's submitted.

Settings

SettingWhat it does
ModalThe form to show. Choose Choose a modal until you pick one.

Ways out

Submitted.

Produces

One token for each input, named from its label in lowercase with underscores. The label "Your idea" gives {modal.your_idea}. A menu's token holds the labels picked, joined with ", ". An upload's token holds each file's address, one per line.

Notes

  • Open a form as the first answer to a command or button. Discord can't show one after you've already replied, or in answer to another form. Put slow steps, such as an API request, after the form, not before it.
  • If the person closes the form, nothing happens and the run ends.
  • Each input of the modal can have a shortest and longest answer, which Discord checks before the form can be sent, and can start filled in with a token, such as their current bio.

Checking the answers

Discord only checks lengths. To check anything else, put a Comparison or Several conditions after Submitted. Since a form can't open another form, ask again by replying with a button that opens this form once more: a button action whose flow is just this node.

Example

A /suggest command opens a form with a Title and Details input. After Submitted, Add row stores {modal.title} and {modal.details}.

A /vouch command opens one form with a Product menu, a Rating menu, a Feedback paragraph and a Screenshot upload. After Submitted, Send to channel posts an embed whose description is {modal.feedback} and whose image is {modal.screenshot}.

Was this page helpful?