Skip to main content

Checkbox

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 DhxForm Inputs

Related sample: Form. Checkboxes

Adding Checkbox

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

var form = new dhx.Form("form_container", {
rows: [
{
type: "checkbox",
label: "I agree",
name: "agree",
id: "agree",
value: "checkboxvalue"
}
]
});

Properties

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:

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

Methods

Check the full list of methods of the Checkbox control.

Events

Check the full list of events of the Checkbox control.