Replace Description header with dynamic text in lightbox.

Hi,

how we can replace Description header of light box with dynamic event title. i also attached screen shot and put red box there.


Hello,

It’s possible to modify section labels, you can use following code:

scheduler.attachEvent("onBeforeLightbox", function (event_id) { var ev = scheduler.getEvent(event_id); // getting event scheduler.locale.labels.section_description = "Example: "+ev.text; // changing section label, 'description' is the name of the section scheduler.resetLightbox(); // resetting lightbox to apply new section label return true; // lightbox will be displayed });
Best regards,
Ilya

Hi Ilya,

 I have add code given by . when i click to see event description then light-box not opened. I have called this code just before the below code.

scheduler.config.lightbox.sections = [
{ name: “description”, height: 130, map_to: “text”, type: “textarea”, focus: true },""
// { name: “location”, height: 43, type: “textarea”, map_to: “details”},
// { name: “Tags”, height: 30, type: “textarea”, map_to: “Tags” },
// { name: “time”, height: 72, type: “time”, map_to: “auto” }
]

and also try after that. please tell me position where is call this code.

Hello,

I’ve attached sample.

Best regards,
Ilya
dynamic_lightbox.zip (38.2 KB)

hi,

i’d like to do this in Wordpress, is that possible?

actually, my problem is that all my events display on the calendar like this… “text_1”, or “text_2”, no matter what type in the description field (or any field).

thanks,
g

i realized what my problem was: i changed the first field to a dropdown menu, and it should be reserved for the title (textarea).

awesome.

Hello,

Even with plugin version it should be possible to the same thing.

  1. Open scheduler_include.html file
  2. Add

<script type="text/javascript> scheduler.attachEvent("onBeforeLightbox", function (event_id) { var ev = scheduler.getEvent(event_id); // getting event scheduler.locale.labels.section_description = "Example: "+ev.text; // changing section label, 'description' is the name of the section scheduler.resetLightbox(); // resetting lightbox to apply new section label return true; // lightbox will be displayed }); </script>
Best regards,
Ilya

How to change the header title of the lightbox for newly creating events


Hello,

You need to use onBeforeLightbox event. Please check the demo:
docs.dhtmlx.com/scheduler/snippet/567062a2