scheduler event form customize

Hi, i need to add some javascript code in this event template because it is not only a basic form. It has a multiview and in one cell there is the common fields like start date, end date and so on…and in other cells there are other fields.

I need to implement some events for that multiview too, inside that template, bacause outside there, object are undefined.

Resuming, i need a complex webix form inside that event template.

Any help or sample please?

Hi,

You can put Multiview configuration into scheduler.config.form. Moreover, you can put a “rows” layout:

  • one row can be a button for changing visible views
  • and the other one - Multiview with 2 views
scheduler.config.form = [
   { 
        view: "segmented", id:"pages", options:[
            {id:"formPage1",value: "Main Fields"},
            {id:"formPage2",value: "Optional Fields"}
        ]
   },
   {
      id: "formPages",
      cells:[
        { id: "formPage1", rows:[
            { view:"text",  id:"text", name:'text', ...},
            { view:"datetext", id:'start_date', name:'start_date', ...},
            {view:"datetext",	id:'end_date',name:'end_date', ...}, 
            {view:"checkbox",	id:'allDay', name:'allDay', ...}, ...
        ]},
        { id: "formPage2", rows:[
            {view:"text", id:'location', name:"location",.... },
            ...
        ]}
      ]
  }
];

And here is how you can access elements inside this form and set event handlers:

$$("scheduler").$$("pages").attachEvent("onAfterTabClick",function(id){
	$$("scheduler").$$(id).show();
})

thanks Maria but where do i have to put the onAfterTabClick event bacause the array object $$(“scheduler”).$$(“pages”) is just defined inside that scheduler.config.form…

i am confused with this…thanks and regards!

I got it…Thanks…regards!