input_block: Input Block

View source: R/layout_blocks.R

input_blockR Documentation

Input Block

Description

A block that collects information from users - it can hold a plain_text_input_element, a checkbox_element, a radio_button_element, a select_menu_element, a multi_select_menu_element, or a datepicker_element. Read our guides to collecting input in modals or in Home tabs to learn how input blocks pass information to your app. Available in surfaces: Modals Home tabs

Usage

input_block(
  label,
  element,
  dispatch_action = NULL,
  block_id = NULL,
  hint = NULL,
  option = NULL
)

Arguments

label

A label that appears above an input element in the form of a text_object that must have type of plain_text. Maximum length for the text in this field is 2000 characters.

element

A plain_text_input_element, checkbox_element, radio_button_element, select_menu_element, multi_select_menu_element, or datepicker_element.

dispatch_action

A boolean that indicates whether or not the use of elements in this block should dispatch a block_actions payload. Defaults to false.

block_id

A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. block_id should be unique for each message and each iteration of a message. If a message is updated, use a new block_id.

hint

An optional hint that appears below an input element in a lighter grey. It must be a text_object with a type of plain_text. Maximum length for the text in this field is 2000 characters.

optional

A boolean that indicates whether the input element may be empty when a user submits the modal. Defaults to false.

See Also

https://api.slack.com/reference/block-kit/blocks#input

Other Blocks: actions_block(), context_block(), divider_block(), file_block(), header_block(), image_block(), section_block()


samterfa/slackme documentation built on April 11, 2022, 3:29 a.m.