radio
Module(s): vncanvas-base, vncanvas-form
Description: Creates a HTML form radio element with corresponding label.
- Note: Use only on a 'form', not a 'cform'
- Instantiating form elements without using "form" is not recommended.
radio, {param} |
Creates a radiobutton. Parameters are given as {param:value, param:value, ...} |
| Parameter | Attributes and Description |
|---|---|
|
name:"radio_label"
|
This sets the label radiobutton.
|
|
value:"radio_value"
|
This sets the value and id of the radiobutton.
|
|
bind:"variable"
|
The corresponding variable to bind the
radiobutton to. Changing the value of the radiobutton 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 radiobuttons are bound to a variable named "actorGender".
chapter = [
...
/* To act as select-one buttons, use the same
"name" and bind variable for the radiobuttons */
radio, {name:"gender",
value:"male",
bind:"actorGender",
tip:"Actor is male"},
radio, {name:"gender",
value:"female",
bind:"actorGender",
tip:"Actor is female"},
...
];