isChecked()
checks whether a checkbox of the CheckboxGroup control is checked
isChecked(id?: string): boolean | { [id: string]: boolean };
Parameters:
id: string
- optional, the id of a checkbox
Returns:
Either a boolean value or an object.
If the id of a checkbox is specified, the method returns a boolean value true
, if the checkbox is checked; otherwise, false
.
If the id of a checkbox is not specified, the method returns an object with a set of key:value pairs where the key is the id of a checkbox and the value is the state of the checkbox.
Example
form.getItem("CheckboxGroup").isChecked("checkbox_id_3");
// -> true/false
form.getItem("CheckboxGroup").isChecked();
// -> { "checkbox_id_1": true, "checkbox_id_2": false }