Is there a way to disable checkbox activation when its label is clicked? Ie if there is a checkbox with label “Label” then clicking on the word “Label” would not toggle the checkbox?
Hi
add once after dhtmlx.js is loaded
dhtmlXForm.prototype.items.checkbox.doAttachEvents =
dhtmlXForm.prototype.items.radio.doAttachEvents = function(item) {
var that = this;
// image click
item.childNodes[item._ll?1:0][window.dhx4.isIPad?"ontouchstart":"onmousedown"] = function(e) {
e = e||event;
if (e.preventDefault) e.preventDefault();
var t = (e.target||e.srcElement); // need to skip "note" if exists
if (!this.parentNode._enabled || this.parentNode._ro || (typeof(t.className) != "undefined" && t.className == "dhxform_note")) {
e.cancelBubble = true;
if (e.preventDefault) e.preventDefault(); else e.returnValue = false;
return false;
}
that.doClick(this.parentNode);
}
}