Disable lightbox

Is there a way to disable lightbox for Add button? I want to open another custom popup on click.

For task I do this on “onTaskDblClick” event and set gantt.config.details_on_dblclick = false;

Hi,
try blocking it using onBeforeLightbox event. You can detect whether it is opened for creating a new task (on ‘plus’ click) by checking a ‘$new’ flag of the task

[code]gantt.attachEvent(“onBeforeLightbox”, function(id){
var task = gantt.getTask(id);

if(task.$new){
	
	dhtmlx.confirm({
		text: "Create <b>" + task.text + "</b>?",
		callback: function(res){
			if(res){
				delete task.$new;
				gantt.addTask(task);
			}else{
				gantt.deleteTask(task.id);
			}
		}
	});
	
	return false;
}
return true;

});[/code]

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