DHTMLX Docs & Samples Explorer

checkItem(name, value)

Checks item (checkbox and radio only).

Parameters:

  • name - the id of item (the item's parameter 'name')
  • value - the value of a radio button ( the radio's parameter 'value'). Required for 'radio' items only
formData = [
		{type: "radio", name: "gender", value: "male", label: "Male"},
		{type: "radio", name: "gender", value: "female", label: "Female"},
                {type: "checkbox", name:"license", label: "Driving license"},
                ...
];
myForm = new dhtmlXForm("myForm", formData);
myForm.checkItem("gender", "male"); // for radio button
myForm.checkItem("license");  // for other items

See also: