According to http://docs.dhtmlx.com/doku.php?id=dhtmlxform:dhtmlxform2_controls&s[]=default&s[]=value&s[]=custom&s[]=control
When you have radio buttons and you want one to default to be selected you simply do this:
checked: “1”
I have done that one a recurring form with no luck. Here is what I have:
scheduler.config.lightbox.sections = [{ name: “description”, height: 50, map_to: “text”, type: “textarea”, focus: false },
{ name: “myOptions”, options: [
{ key: 2, label: “Option 2”, value: “2” },
{ key: 1, label: “Option 1”, value: “1”, checked: “1” }
], height: 21, width: 50, map_to: “myOptions”, type: “radio”
},
{ name: “recurring”, type: “recurring”, map_to: “rec_type”, button: “recurring” },
{ name: “time”, height: 72, type: “time”, map_to: “auto”}];
When I open the form neither are checked. What am I doing wrong?