Enum SelectionInputType
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
SelectionInputType
הפורמט של הפריטים שהמשתמשים יכולים לבחור. אפשרויות שונות תומכות בסוגים שונים של אינטראקציות. לדוגמה, משתמשים יכולים לסמן כמה תיבות סימון, אבל יכולים לבחור רק פריט אחד מתפריט נפתח.
כל קלט של בחירה תומך בסוג אחד של בחירה. לדוגמה, אי אפשר לשלב בין תיבות סימון למפסקים.
הפיצ'ר זמין באפליקציות של Google Chat ובתוספים של Google Workspace.
כדי לקרוא למאפיין enum, צריך לקרוא לכיתה ההורה, לשם ולנכס שלו. לדוגמה,
CardService.SelectionInput.CHECK_BOX
.
מאפיינים
נכס | סוג | תיאור |
CHECK_BOX | Enum | סגנון הקלט של תיבות סימון. ברירת מחדל. |
RADIO_BUTTON | Enum | סגנון הקלט של כפתור הבחירה. אפשר לבחור עד פריט אחד בקבוצה. |
DROPDOWN | Enum | סגנון הקלט לבחירה בתפריט הנפתח. |
SWITCH | Enum | קבוצת מתגים. המשתמשים יכולים להפעיל מתג אחד או יותר. |
MULTI_SELECT | Enum | תפריט לבחירת פריטים מרובים לנתונים סטטיים או דינמיים. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003e\u003ccode\u003eSelectionInputType\u003c/code\u003e dictates how users interact with selectable items, such as choosing single or multiple options through checkboxes, radio buttons, dropdowns, switches, or multi-select menus.\u003c/p\u003e\n"],["\u003cp\u003eEach selection input element supports a single selection type, and combining different types like checkboxes and switches within the same element is not allowed.\u003c/p\u003e\n"],["\u003cp\u003eThis feature is available for use in Google Chat apps and Google Workspace Add-ons.\u003c/p\u003e\n"],["\u003cp\u003eTo specify a selection type, use the \u003ccode\u003eCardService.SelectionInput\u003c/code\u003e enum followed by the desired property, for instance, \u003ccode\u003eCardService.SelectionInput.CHECK_BOX\u003c/code\u003e for checkboxes.\u003c/p\u003e\n"]]],["Users can select items in various formats, including `CHECK_BOX`, `RADIO_BUTTON`, `DROPDOWN`, `SWITCH`, and `MULTI_SELECT`. Each selection input supports only one style, and mixing styles is unsupported. Checkboxes and switches allow multiple selections, while radio buttons and dropdowns are limited to single selections. `MULTI_SELECT` is used for multiselect options. This is applicable to Google Chat apps and Google Workspace add-ons. Each selection style can be called by it's parent class, name and property.\n"],null,["# Enum SelectionInputType\n\nSelectionInputType\n\nThe format of the items that users can select. Different options support different types of\ninteractions. For example, users can select multiple checkboxes, but can only select one item\nfrom a dropdown menu.\n\nEach selection input supports one type of selection. Mixing checkboxes and switches, for\nexample, isn't supported.\n\nAvailable for Google Chat apps and Google Workspace add-ons.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.SelectionInput.CHECK_BOX`. \n\n### Properties\n\n| Property | Type | Description |\n|----------------|--------|--------------------------------------------------------------------------|\n| `CHECK_BOX` | `Enum` | Checkbox input style. Default. |\n| `RADIO_BUTTON` | `Enum` | Radio button input style. At most one item in the group can be selected. |\n| `DROPDOWN` | `Enum` | Dropdown menu selection input style. |\n| `SWITCH` | `Enum` | A set of switches. Users can turn on one or more switches. |\n| `MULTI_SELECT` | `Enum` | A multiselect menu for static or dynamic data. |"]]