A block that collects information from users - it can hold a plain-text input element, a select menu element, a multi-select menu element, or a datepicker.

input_block(label, element, id = NULL, hint = NULL, optional = NULL)

Arguments

label

character, a label that appears above an input element.

element

An plain-text input element, a select menu element, a multi-select menu element, or a datepicker.

id

character, A string acting as a unique identifier for a block. Default: NULL

hint

An optional hint that appears below an input element in a lighter grey. Default: NULL

optional

A boolean that indicates whether the input element may be empty when a user submits the modal. Default: NULL

Value

input_block class

Details

Available in surfaces: Modals, Messages, Home tabs

See also

Examples

input_block( id = 'input123', label = 'Label of input', element = plaintext_element( id = 'plain_input', placeholder = 'Enter some plain text' ) )
#> { #> "type": "input", #> "block_id": "input123", #> "label": { #> "type": "plain_text", #> "text": "Label of input" #> }, #> "element": { #> "type": "plain_text_input", #> "action_id": "plain_input", #> "placeholder": { #> "type": "plain_text", #> "text": "Enter some plain text" #> } #> } #> }