Bootstrap modal form instead of lightbox

I’m trying to replace the lightbox with a custom form. I have followed the example for this.

This is the code I’m using to display the bootstrap modal custom form:

scheduler.showLightbox = function(id) {
    lightbox_event = scheduler.getEvent(id);
    scheduler.startLightbox(id, null);
    $('#my_form').modal('show');

The problem is that this will display the form but I cannot click anything. When I remove the scheduler.startLightbox(id, null); then it displays as well and I can edit but when I try to save it says it scheduler.getEvent(scheduler.getState().lightbox_id) is undefined.

Why is this line:
scheduler.startLightbox(id, null);
causing the modal bootstrap form to be locked?

scheduler.startLightbox(id, null);

This lines generates its own modality layer.
Try to change code as

scheduler.startLightbox(id, null); scheduler.hideCover(); //removes scheduler's modality layer

Thanks a lot, this does the trick!