Skip to main content


A control that allows a user to make a choice between one or several opposite options by toggling them.

Checkbox control

Related sample: Form. All controls

Related sample: Form. Checkboxes

Adding Checkbox

You can easily add a Checkbox control during initialization of a form:

const form = new dhx.Form("form_container", {
rows: [
type: "checkbox",
label: "I agree",
name: "agree",
id: "agree",
value: "checkboxvalue"


View the full list of configuration properties of the Checkbox control.

Working with Checkbox

You can manipulate a Checkbox control by using methods or events of the object returned by the getItem() method.

For example, you can get the value of the control:

const value = form.getItem("checkbox").getValue();


Check the full list of methods of the Checkbox control.


Check the full list of events of the Checkbox control.