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.

plaintext_element(
  id,
  placeholder,
  initial_value = NULL,
  multiline = NULL,
  min_length = NULL,
  max_length = NULL
)

Arguments

id

character, an identifier for the input value when the parent modal is submitted.

placeholder

character, A text object that defines the placeholder text shown in the plain-text input.

initial_value

character, the initial value in the plain-text input when it is loaded. Default: NULL

multiline

logical, indicates whether the input will be a single line (FALSE) or a larger textarea (TRUE). Default: NULL

min_length

integer, the minimum length of input that the user must provide. If the user provides less, they will receive an error. Default: NULL

max_length

integer, The maximum length of input that the user can provide. If the user provides more, they will receive an error in the response. Default: NULL

Value

block element object

Details

Works with block types: Section, Actions, Input

See also

Examples

plaintext_element( id = 'plain_input', placeholder = 'Enter some plain text' )
#> { #> "type": "plain_text_input", #> "action_id": "plain_input", #> "placeholder": { #> "type": "plain_text", #> "text": "Enter some plain text" #> } #> }