Reference documentation and code samples for the Google Apps Chat V1 Client class SelectionInput.
A widget that creates one or more UI items that users can select.
For example, a dropdown menu or checkboxes. You can use this widget to collect data that can be predicted or enumerated. For an example in Google Chat apps, see Add selectable UI elements . Chat apps can process the value of items that users select or input. For details about working with form inputs, see Receive form data . To collect undefined or abstract data from users, use the TextInput widget. Google Workspace Add-ons and Chat apps :
Generated from protobuf message google.apps.card.v1.SelectionInput
Namespace
Google \ Apps \ Card \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
The name that identifies the selection input in a form input event. For details about working with form inputs, see Receive form data .
↳ label
string
The text that appears above the selection input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be "Urgency" or "Select urgency".
↳ type
int
The type of items that are displayed to users in a SelectionInput
widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
↳ items
array< Google\Apps\Card\V1\SelectionInput\SelectionItem
>
An array of selectable items. For example, an array of radio buttons or checkboxes. Supports up to 100 items.
↳ on_change_action
Google\Apps\Card\V1\Action
If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form. For details about working with form inputs, see Receive form data .
↳ multi_select_max_selected_items
int
For multiselect menus, the maximum number of items that a user can select. Minimum value is 1 item. If unspecified, defaults to 3 items.
↳ multi_select_min_query_length
int
For multiselect menus, the number of text characters that a user inputs before the app queries autocomplete and displays suggested items in the menu. If unspecified, defaults to 0 characters for static data sources and 3 characters for external data sources.
↳ external_data_source
↳ platform_data_source
getName
The name that identifies the selection input in a form input event.
For details about working with form inputs, see Receive form data .
string
setName
The name that identifies the selection input in a form input event.
For details about working with form inputs, see Receive form data .
var
string
$this
getLabel
The text that appears above the selection input field in the user interface.
Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be "Urgency" or "Select urgency".
string
setLabel
The text that appears above the selection input field in the user interface.
Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be "Urgency" or "Select urgency".
var
string
$this
getType
The type of items that are displayed to users in a SelectionInput
widget.
Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
int
setType
The type of items that are displayed to users in a SelectionInput
widget.
Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
var
int
$this
getItems
An array of selectable items. For example, an array of radio buttons or checkboxes. Supports up to 100 items.
setItems
An array of selectable items. For example, an array of radio buttons or checkboxes. Supports up to 100 items.
$this
getOnChangeAction
If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form.
For details about working with form inputs, see Receive form data .
hasOnChangeAction
clearOnChangeAction
setOnChangeAction
If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form.
For details about working with form inputs, see Receive form data .
$this
getMultiSelectMaxSelectedItems
For multiselect menus, the maximum number of items that a user can select.
Minimum value is 1 item. If unspecified, defaults to 3 items.
int
setMultiSelectMaxSelectedItems
For multiselect menus, the maximum number of items that a user can select.
Minimum value is 1 item. If unspecified, defaults to 3 items.
var
int
$this
getMultiSelectMinQueryLength
For multiselect menus, the number of text characters that a user inputs before the app queries autocomplete and displays suggested items in the menu.
If unspecified, defaults to 0 characters for static data sources and 3 characters for external data sources.
int
setMultiSelectMinQueryLength
For multiselect menus, the number of text characters that a user inputs before the app queries autocomplete and displays suggested items in the menu.
If unspecified, defaults to 0 characters for static data sources and 3 characters for external data sources.
var
int
$this
getExternalDataSource
An external data source, such as a relational data base.
hasExternalDataSource
setExternalDataSource
An external data source, such as a relational data base.
$this
getPlatformDataSource
A data source from Google Workspace.
hasPlatformDataSource
setPlatformDataSource
A data source from Google Workspace.
$this
getMultiSelectDataSource
string