Hello!
I’ve been looking into the developer documentation for checking a checkbox by default. If I just set the default_value to the checked_value
checked_value: “True”, unchecked_value: “False”,
It appears like:
<input id=“1377070487727” type=“checkbox” value=“true” name=“pause” '>
Which means nothing because true is set by default
.
How could I set checked=“checked” in a typetype=“checkbox” section?
Thanks for your help!! 
And other related question is, how could I check/uncheck it using JS?
I can take the section using
var mySection = scheduler.formSection(‘pause’);
I know it’s possible to change value or options in a Select as is documented here:
docs.dhtmlx.com/scheduler/api__s … ction.html
But for checked I can’t find any documentation, so any help would be really appreciated.
THanks!
Hello,
looks like default values and basic aproach for setting value programmatically (with scheduler.formSection(control).setValue) doesn’t work quite well for checkbox control.
We’ll fix the problem as soon as possible. As a workaround, you can set default values directly to new event:scheduler.attachEvent("onEventCreated", function(id){
scheduler.getEvent(id).checkbox_property = checkbox_value;
return true;
});
docs.dhtmlx.com/scheduler/api__s … event.html
and check/uncheck checkbox node
scheduler.formSection(checkboxName).node.getElementsByTagName("input")[0].checked = true;
docs.dhtmlx.com/scheduler/api__s … ction.html
Ok.
Thanks Aliaksandr, it work’s!