gantt.config.lightbox.sections add

Hi,

var opts = [
{ key: 1, label: ‘System Administrator’ },
{ key: 2, label: ‘Matt Admin’ },
{ key: 3, label: ‘User Admin’ }
];
gantt.locale.labels[“section_resource”] = “Resource”;
gantt.config.lightbox.sections = [
{name: “description”, height: 38, map_to: “text”, type: “textarea”, focus: true,
{name:“resource”, height:22, map_to:“resource”, type:“select”, options:opts},
{name:“resourceId”, height:22, map_to:“resourceid”, type:“select”, options:opts},
{name: “material”, height: 38, map_to: “material”, type: “textarea”, focus: false},
{name: “time”, type: “duration”, map_to: “auto”}
];

this is my code i added a select option fro resource now i select one resource example “system Administrator” i get lable name and key value. when select the option how can i get both values and as weel as it’s possible to map more then

example : lable value want to be mapto resource
key value want to be mapto resource_id for each task

Hello.

In this case you could handle onLightboxSave event. You could use one select and it will store id and in onLightboxSave handler you could iterate over options, find needed label and set it to event.
docs.dhtmlx.com/gantt/api__gantt … event.html
But in common case event object stores only ids. Are you sure it’s necessary to use label in event object.