Edit lightbox option box not populated

Hi,

When I have task already created and one field is associated to an options box, and I need to change the current value, the combo is not populated with the previous value.

Is this the expected behaviour?
Should I implement the event before the lightbox is open to select the value? If so, how?

Thanks

Do you mean you need to change a value of a control when the lightbox is opened?
You can do it from the code

gantt.getLightboxSection('sectionName').setValue("sectionValue");

Or you can use onBeforeLightbox or onTaskCreated event to assign value to the task object before the ligthbox is opened

docs.dhtmlx.com/gantt/api__gantt … event.html
docs.dhtmlx.com/gantt/api__gantt … event.html

In the code you’ve sent before, you use gantt.form_blocks.select.set_value in order to hide selector for certain tasks. That may cause issues, as the altered code does not call the original logic of .set_value method.
Instead of altering .set_value, you can also hide this control from onBeforeLightbox event

gantt.attachEvent("onBeforeLightbox", function(id) {
    gantt.getLightboxSection('sectionName').node.style.display = "none";
    return true;
});

Thanks for the suggestion. I will test it.

To reproduce my problem, use the latest html provided and do the following:
-Click + on Group #1, in the lightbox enter t1 for task name and select any element from the combobox.
-Click Save.
-Double click the created task. When the lightbox popup the process component combo is empty and not using the value selected in the first step.