Override Add Task Button Action

Hi,

I want to show a custom dialog box in order to add a task to the Gantt. How can this be achieved?
I have tried these settings :
ganttObject.config.details_on_create = false;

ganttObject.attachEvent(“onBeforeTaskAdd”, function(id) {
console.log(“Gantt:onBeforeTaskAdd [” + id + “]”);
return false;
});

But this does not work and I get errors.
We don’t want the new task to be created by Gantt and it should be done when the user fills information in our custom form and save it.

Hi,
try replacing lightbox with your custom form using onBeforeLightbox event. Check the sample
docs.dhtmlx.com/gantt/snippet/cdd5dd05

Thanks, it worked!