value

Property is read-only. It cannot be set in script.

Returns the selected value or values of the component (not the labels).

Type

  • Value of the selected option for single-value Form components (Slider, Spinner, RadioButton, ComboBox).

  • Array of values for the selected options for a multiple-value Form component (CheckBox).

Examples

// RadioButton:
alert(RadioButton1.value) // returns value of selection

// CheckBox with two or more items selected:
alert(CheckBox1.value[0]) // returns value of first selection
alert(CheckBox1.value[1]) // returns value of second selection
alert(CheckBox1.value[2]) // returns null

Either syntax below can be used in component script:

value               // unqualified
Component1.value    // qualified

For onInit/onRefresh scripts, and for component and property scripts on other components, the second (qualified) form is required.