Come build with us.
Stacks API v6 for Stacks 2.5
select
items
default
clearValue
id
title
enable
toolTip
select
select
A popup menu for selecting a single item from a short list. Popup menus are a good way to choose from a short list of items. If there are only two items in the list a checkbox is probably more appropriate. If the list of items is long (more than 15 or so) then it may be more appropriate to just ask the user to type in the value in a Text Input field.
items
Array of menu item dictionaries
The menu items to be displayed. These are specified in an array of menu item dictionaries. Each dictionary contains a Title/Value pair. The title will be what the user sees. The value is what gets used in templates.
title
— the title of the menu item that will be shown to the user.value
— the value of the menu item that will be used for template replacement.default
string
The first menu item.
When the stack is placed onto the page the default value will be used. If no default is provided, the first menu item will be selected.
The default value for a menu should correspond to one of the Value properteis from the Menu Items array (not the Title property).
clearValue
string
""
id
string
The ID for this control. This ID must be unique within this stack. The ID is used to refer to control's property. IDs should be alpha-numeric (dashes and underscores are allowed), but should not contain special characters.
title
string
"Untitled"
The title displayed next to the control. Long titles will be trancated, so keep it short.
enable
dictionary
enabled
Hide or show the control based on the value of another property.
Enables allow a stack to show only the controls needed by the user to achieve a specific task.
The enable dictionary defines the ID of another control and the value that other control must equal. When the other control's value is not equal to the provided value, this control is hidden.
id
(string) — the ID of another control on which this control (Popup Menu) should depend.value
(any type) — when the value of the other control is equal to this value, this control is displayed, otherwise it is hidden.Warning: creating infinite loops in enable dependencies has undefined behavior but will likely result in a crash.
toolTip
string
No tooltip is displayed.
The tooltip value is used to display hints for the user on the use of each control. If the function of the control is obvious, then a tooltip should be avoided. Simply re-displaying redundant information like the title has no value to the user.