Skip to main content

Template

A container with some HTML content inside.

template_editor

scheduler.locale.labels.section_template = 'Details';// sets the name of the section

scheduler.config.lightbox.sections = [
{ name:"text", height:50, map_to:"text", type:"textarea", focus:true},
{ name:"template", height: 40, type:"template", map_to:"my_template"},
{ name:"time", height:72, type:"time", map_to:"auto"}
];
scheduler.attachEvent("onEventCreated", function(id, e) {
var ev = scheduler.getEvent(id);
ev.my_template = "<b>Holder:</b>"+ ev.holder+"

<b>Room:</b>"+ ev.room;
});

Initialization

To add the Template control to the lightbox, follow these steps:

  1. Add the section to the lightbox configuration:
scheduler.config.lightbox.sections = [
{ name:"text", ... },
{ name:"template", height: 40, type:"template", map_to:"my_template"},
{ name:"time", ...}
];
  1. Set the label for the section:
scheduler.locale.labels.section_template = 'Details';
  1. Set the content of the control with the help of some event, e.g. the onBeforeLightbox event:
scheduler.attachEvent("onBeforeLightbox", function(id) {
var ev = scheduler.getEvent(id);
ev.my_template = "<b>Holder:</b>"+ ev.holder+"

<b>Room:</b>"+ ev.room;
return true;
});

Properties

The following properties are mostly important and commonly set for the 'template' control (see the full list here):

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.