plain_text_input_element: Plain-Text Input Element

View source: R/block_elements.R

plain_text_input_elementR Documentation

Plain-Text Input Element

Description

A plain-text input, similar to the HTML <input> tag, creates a field where a user can enter freeform data. It can appear as a single-line field or a larger textarea using the multiline flag. To use interactive components, you will need to make some changes to prepare your app. Read our guide to enabling interactivity. Works with block types: Input. Plain-text input elements are supported in the following app surfaces: Home tabs Modals

Usage

plain_text_input_element(
  action_id,
  placeholder = NULL,
  multiline = NULL,
  min_length = NULL,
  max_length = NULL,
  dispatch_action_config = NULL
)

Arguments

action_id

An identifier for the input value when the parent modal is submitted. You can use this when you receive a view_submission payload to identify the value of the input element. Should be unique among all other action_ids in the containing block. Maximum length for this field is 255 characters.

placeholder

A plain_text only text_object that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.

multiline

Indicates whether the input will be a single line (false) or a larger textarea (true). Defaults to false.

max_length

The maximum length of input that the user can provide. If the user provides more, they will receive an error.

dispatch_action_config

A dispatch_action_configuration_object that determines when during text input the element returns a block_actions payload.

initial_value

The initial value in the plain-text input when it is loaded.

min_Length

The minimum length of input that the user must provide. If the user provides less, they will receive an error. Maximum value is 3000.

See Also

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

Other Elements: button_element(), channels_multi_select_menu(), channels_select_menu(), checkbox_element(), conversations_multi_select_menu(), conversations_select_menu(), datepicker_element(), external_multi_select_menu(), external_select_menu(), image_element(), overflow_menu_element(), radio_button_group_element(), static_multi_select_menu(), static_select_menu(), timepicker_element(), users_multi_select_menu(), users_select_menu()


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