Create multiple splits with one Lightbox

Good day all,

I seem to remember seeing an example of adding multiple Time Frames to the lightbox, but I cannot find it.

What I want to accomplish is the following workflow:

Add Task > New Light Box Displayed
Lightbox contains 3 Time Frames

On save, Add each timeframe as a split

Any ideas or direction would be appreciated.

Thank you.

Hello,

As I understood your question correctly, you want to make repeatable split tasks from the certain task with a certain time period in the lightbox of the task. Unfortunately, there is no built-in way to do it. But you can implement it by using the Gantt API and JavaScript.
For example, you can create custom buttons for applying the recurrent form for creating split tasks. It can be a custom section where you can specify controls for amount of repeatable tasks and intervals of days.
There are articles:
Changing Buttons in the Lightbox Gantt Docs ;
Creating Custom Element Gantt Docs ;
And generate the required split tasks from the specified values from controllers. It might look like:

function set_recurrency(id) {
    let task = gantt.getTask(id);
    const recurrencies = document.getElementById("recNumber").value;
    const daysInterval = document.getElementById("daysInterval").value;
    for (let i = 0; i < recurrencies; i++) {
        let new_task = gantt.copy(task);
        new_task.id = gantt.uid();
        new_task.parent = task.id;
        new_task.start_date = gantt.date.add(task.start_date, i * daysInterval, "day");
        new_task.end_date = gantt.calculateEndDate(new_task.start_date, new_task.duration);
        new_task.recurrent = true;
        gantt.addTask(new_task);
    }
    task.render = 'split';
    task.type = gantt.config.types.project;
    gantt.updateTask(task.id);
    gantt.render();
}

Please check the example of how it might be implemented:
https://snippet.dhtmlx.com/ef6d2mk4 ;
This is not a complete demo, but I hope I showed you one of the possible directions.