Input types and properties
Explore different input types and their properties.
Input types
While designing your actions, you can add text fields, number fields, select fields, date & time inputs and texts to your actions. Let's take a closer look at each component and their settings.
Text fields
Text fields are used to store textual information. Available types are text, text area, email, link and phone number fields.
When the action is run, the value of the input becomes the entered string in the text field.
Text
It is a free form single-line text field used for entering short lengths of text.
Properties of a text field
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- Default value
- Validation for min and max character length
- Regular expression to validate entered data
Text area
It is a multiple-line text field used to store longer lengths of text.
Properties of a text area
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- Default value
- Validation for min and max character length
- Regular expression to validate entered data
Email
It is a single-line text field that can store an email address. It is simply a text field with an email validation rule.
Properties of an email field
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- Default value
Link
It is a single-line text field that can store a URL. It is simply a text field with a preset URL validation rule.
Properties of a link field
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- Default value
Phone number
It is a single-line text field that can store a phone number. It is simply a text field with a preset phone number validation rule.
Properties of a phone number field
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- Default value
Number fields
Number fields are used to store information in number format. Available types are integer and decimal fields.
When the action is run, the value of the input becomes the entered integer or decimal in the number field.
Integer
It is a single-line field that can store an integer. It is simply a text field with a preset integer validation rule.
Properties of an integer field
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- Default value
Decimal
It is a single-line field that can store a decimal. It is simply a text field with a preset decimal validation rule.
Properties of a decimal field
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- Default value
Select fields
Select fields are used to provide options that can be selected from a list. Available types are single select, multi select, checkbox, checkbox group and radio button group.
When the action is run, the value of the input becomes the identifier value of the selected option or options.
Single select
Allows selecting an option from a dropdown list. Single select inputs include type-ahead functionality, where a user can type a part or all of an option to filter matching ones from the list.
Each option of a select component has a display and an identifier value. Display value is an option's visible value on the dropdown list. Input's value becomes the selected option's identifier value when the action is run.
→ Learn how to configure sources for single select inputs.
Properties of a single select field
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- If search-as-you-type option is enabled
- Source(s) to generate options
- Default value
- Min and max character length of each option
- Regular expression validation for each option
- Type of each option. It can be
String
,Email
,URL
,Phone
,Integer
,Float
orMap
.
Multi-select
Allows selecting multiple options from a list. Multi select inputs include type-ahead functionality, where a user can type a part or all of an option to filter matching ones from the list.
Each option of a multi select component has a display and an identifier value. Display value is an option's visible value on the dropdown list. The identifier values of selected options are added up to an array, which then becomes the value of the input when the action is run.
→ Learn how to configure sources for multi-select inputs.
Properties of a multi select field
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- If search-as-you-type option is enabled
- Source(s) to generate options
- Default value
- Min and max number of options
- Type of each option. It can be
String
,Email
,URL
,Phone
,Integer
,Float
orMap
.
Checkbox
Allows enabling or ticking a single value. When the action is run, if this field is ticked, input's value becomes true
. If it is not ticked, input's value becomes false.
Properties of a checkbox field
- ID, label and helper text
- If it is hidden
- Default value. Can be
Not set
,False
orTrue
Checkbox group
Allows choosing or ticking multiple options from a list of checkboxes.
Each option in a checkbox group has a display and an identifier value. Display value is the option's visible value near the tick. The identifier values of selected options are added up to an array, which then becomes the value of the input when the action is run.
Properties of a checkbox group
- ID, label and helper text
- If it is hidden
- Source(s) to generate options
- Default value
- Min and max number of options
- Type of each option. It can be
String
,Email
,URL
,Phone
,Integer
,Float
orMap
.
Radio button group
Allows selecting from a list of radio buttons.
Each option in a radio button group has a display and an identifier value. Display value is the option's visible value. The identifier values of the selected option is added up to an array, which then becomes the value of the input when the action is run.
Properties of a radio button group
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- Source(s) to generate options
- Default value
- Min and max character length of each option
- Regular expression validation for each option
- Type of each option. It can be
String
,Email
,URL
,Phone
,Integer
,Float
orMap
.
Date & time inputs
Date & time fields are used to select a date from a calendar style UI or select a time of the day. Available types are date, time or a date & time field.
Date
Allows selecting a date from a calendar style UI. Default format of the selected date is YYYY-MM-DD.
When the action is run, the value of the input becomes the selected date in YYYY-MM-DD format.
Properties of a date field
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- Default value
- Validation for min and max date length
- Regular expression to validate entered date
Time
Allows the user to select a time of day. Default format of the selected time is HH:mm.
When the action is run, the value of the input becomes the entered time in HH:mm format.
Properties of a time field
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- Default value
- Validation for min and max time length
- Regular expression to validate entered time
Date & time
Allows the user to select a time of day. Default format of the selected time is in UTC millis format. When the action is run, the value of the input becomes the entered time in UTC millis format.
Properties of a date & time field
- ID, label, placeholder and helper text
- If it is mandatory and if it is hidden
- Default value
Texts
Text inputs are used to style your forms. They are not visible when your action is run on action bar. Available types are header or a text field.
Header
Adds a header to your forms in the hierarchy you speficied. You can use them to style your forms. Headers are not visible when the action is run in Slack.
Text
Adds a plain text block to your forms. You can use them to give information to users to run the aciton or to style your forms. Plain texts are not visible when the action is run on action bar.
Input properties
ID is a unique value among all input components of an action. It is used to get the entered or selected value.
To get the entered or selected value of an input component, use below:
{{input.input_id}}
→ Learn how to access and manipulate the input values.
Label is what is displayed as the name of the component when the action is run.
Placeholder is the text displayed when no value is entered or selected for the input. It can be used as a tip to inform the users on what data to enter or select to run the action.
Helper text is placed as a small note under the input. It contains additional notes or hints about what kind of information should be provided to run the action.
Mandatory: Once this option is enabled, filling out a value for that input becomes mandatory to run the action.
Hidden: Once this option is enabled, input is not visible to users while running the action.
Search: Can be set for single select and multi-select components. It provides search-as you-type functionality. When enabled, only the options with the matching display values are suggested as options when the user types in this field.
Sources: Can be set for single select and multi-select components.
→ Learn how to configure sources for single select inputs.
Validations: Can be set
- for min and max character length of text and text area inputs
- for min and max number of options that can be selected in a multi select input
- as regular expressions to filter entered or selected value
Default value: is the value that the input takes when no value is selected or entered for that input.