K
Docs
API Reference→Pieces→Add Form Field
✏️

Add Form Field

ui.text_inputThe Control PanelControls

Adds one input box to the pop-up form you open next. Put one of these before Show Pop-up Form for each thing you want to ask. Whatever gets typed comes back to your Form Submitted trigger as {{form.values.<custom id>}}.

When to use this
  • →Discord allows five fields per form — extras are dropped
  • →Fields are answered on the client, so the flow never has to wait

On the canvas

This is what Add Form Field looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

✏️
Add Form Field
ui.text_input
Controls
customIdrequired
reason — read it back as {{form.values.reason}}
labelrequired
Why do you want to join?
style
select…
placeholder
Tell us a bit about yourself
value
Leave blank for an empty box
required
boolean…
minLength
0
maxLength
4000
output
error

Config fields

FieldTypeReqWhat it does
customId
reason — read it back as {{form.values.reason}}
textyesCustom id 🏷️
label
Why do you want to join?
textyesQuestion 💬
styleselect—Box size 📏
placeholder
Tell us a bit about yourself
text—Placeholder text 👻
value
Leave blank for an empty box
text—Pre-filled answer ✍️
requiredboolean—Must be answered ❗
minLength
0
number—Shortest answer 🔢
maxLength
4000
number—Longest answer 🔢

Output ports

outputField staged for the next pop-up form
errorMissing a custom id or a label
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
const field = new TextInputBuilder()
  .setCustomId("reason")
  .setLabel("Why do you want to join?")
  .setStyle(TextInputStyle.Paragraph)
  .setRequired(true);
// Read back later as interaction.fields.getTextInputValue("reason")