Checkbox
A control that displays the specified value and allows you to switch it to the opposite one.
Related sample: Form. All controls
Related sample: Form. Checkboxes
Adding Checkbox
You can add a Checkbox control during form initialization:
const form = new dhx.Form("form_container", {
rows: [
{
type: "checkbox",
label: "I agree",
name: "agree",
id: "agree",
value: "checkboxvalue"
}
]
});
Properties
View the full list of Checkbox configuration properties.
Working with Checkbox
You can manage a Checkbox control with the methods and events of the object that the getItem() method returns.
For example, you can get the value of the control:
const value = form.getItem("agree").getValue();
Methods
Check the full list of Checkbox methods.