Hi,
I saw the samples for doing the same for a “select” field, but am not able to adapt it for the checkbox type.
Where could I be going wrong?
[code]var old = scheduler.form_blocks.checkbox.set_value;
scheduler.form_blocks.checkbox.set_value = function(node){
//need to work out how to access the checkbox onchange event
//below works only for select
node.firstChild.onchange = function(){
alert("onchange");
//based on value set certain fields to visible...
}
return old.apply(this, arguments);
}[/code]
Hi Ilya,
For some reason just overriding the function as follows:
scheduler.form_blocks.checkbox.set_value= function(node){
}
causes the checkbox not to be rendered…
The checkbox node loses it’s input child item and consists only of the text title. In the attached screenshot, “Is Booking” should have a checkbox.
I am glad you have worked that out.
Just in case it could help someone else i am attaching sample with my solution. Save it as html and place in [b]scheduler\samples\02_customization[/b] folder.