select
Module(s): vncanvas-base, vncanvas-form
Description: Creates a HTML form dropdown element with corresponding label.
- Note: Use only on a 'form', not a 'cform'
- Instantiating form elements without using "form" is not recommended.
select, {param} |
Creates a dropdown list. Parameters are given as {param:value, param:value, ...} |
| Parameter | Attributes and Description |
|---|---|
|
name:"dropdown_label"
|
This sets the label and id of the dropdown.
|
|
options:[array_of_options]
|
This sets the choices for the dropdown. Declare
as array of option-value pairs.
|
|
bind:"variable"
|
The corresponding variable to bind the
dropdown to. Changing the value of the dropdown updates
the bound variable. "variable" can be a config or user variable.
|
|
tip:"tool_tip_to_display"
|
Optional
The tooltip to display when mouse hovers
over its label.
|
The following dropdown is bound to a variable named "selectedItem".
chapter = [
...
select, {name:"Choose Item",
options:["option1", "value1", "option2", "value2"],
bind:"selectedItem",
tip:"Choose from the given options"},
...
];