onLightboxSave

fires when the user clicks on the 'Save' button in the lightbox

boolean onLightboxSave(string|number id,Task task,boolean is_new);
idstring|numberthe id of unmodified task. Note, at this stage the lightbox values aren't applied to the task object yet and you can access the initial task using gantt.getTask(id)
taskTaskthe modified task object
is_newbooleanspecifies whether the user opens the lightbox to create a new task (true)
or update an existing one (false)
booleandefines whether the default action of the event will be triggered (true) or canceled (false)

Example

gantt.attachEvent("onLightboxSave", function(id, task, is_new){
    //any custom logic here
    return true;
})

Details

The event is blockable. Return false to cancel the 'save' operation and keep the lightbox open.

See also
Back to top