Update task with lightbox values manually after blocking lightbox save


I’m trying to figure out how to manually update a task with the modified lightbox values after blocking the lightbox save. I’m blocking that because of a validation question, but when the user clicks Yes, I have to manually save the task somehow.

The updated task is in the task object of the onLightboxSave event, but how can I update this?

Thank you.


	text: vWarnSchedsametrade,
	ok: vYes, 
	cancel: vNo,
	callback: function(result) {
		if (result == true) {
			//save task manually

		else {
			return false;

Hello Maurice,
If you call a confirm box, it works in an asynchronous way. So you don’t need to return anything because when you click on the “Yes” button, the “Lightbox Save” event is gone. But you still have all variables. So you just copy all values from the modified task object into the non-modified task object, close the lightbox and use gantt.updateTask() command to see the changes.
Here is the snippet:

That works like a charm, thank you!