Dynamic select in lightbox

Hi,

Is it possible to have a dynamic select inside a lightbox depending on a clicked timeline section?

For example:

1 2 3 4 5 6 7 ... ============================================= ... Section A (ID 1) | | | X| | | | | ... Section B (ID 2) | | | | | | | | ...

If I click to the X empty slot I’d like to display a lightbox with a select section with values populated from a database based on the ID 1 of the clicked Section A.

Thx :unamused:

Hello,
you can detect click using onCellClick event. And then display lightbox and set it’s values via formSection.setValue method
docs.dhtmlx.com/scheduler/api__s … event.html
docs.dhtmlx.com/scheduler/api__s … htbox.html
docs.dhtmlx.com/scheduler/api__s … ction.html

What I’m doing wrong? In the lightbox is appearing alert_ops always (instead of alert_opts_b)

var alert_opts = [ { key: 1, label: 'Professional 1' }, { key: 2, label: 'Professional 2' }, { key: 3, label: 'Professional 3' } ]; var alert_opts_b = [ { key: 1, label: 'Professional 4' }, { key: 2, label: 'Professional 5' }, { key: 3, label: 'Professional 6' } ]; scheduler.config.lightbox.sections = [ { name:"professional", height:40, map_to:"type", type:"select", options:alert_opts}, { name:"time", height:72, type:"time", map_to:"auto"} ]; scheduler.locale.labels.section_time = "Data"; scheduler.locale.labels.section_professional = "Professional"; scheduler.attachEvent("onCellDblClick", function (x_ind, y_ind, x_val, y_val, e){ var actionData = scheduler.getActionData(e); var section = scheduler.getSection(actionData.section); var section_id = section.key; alert("section_id 1: "+section_id); [b]scheduler.formSection('professional').setValue(alert_opts_b);[/b] scheduler.showLightbox = function(id) { var ev = scheduler.getEvent(id); scheduler.startLightbox(id); }; });