connect popup modal form with button click bootstrap 4 code example
Example 1: bootstrap 4 start modal in modal
var modal_lv = 0;
$('.modal').on('shown.bs.modal', function (e) {
$('.modal-backdrop:last').css('zIndex',1051+modal_lv);
$(e.currentTarget).css('zIndex',1052+modal_lv);
modal_lv++
});
$('.modal').on('hidden.bs.modal', function (e) {
modal_lv--
});
Example 2: bootstrap 4 modal popup remote url
$('body').on('click', '[data-toggle="modal"]', function(){
$($(this).data("target")+' .modal-body').load($(this).data("remote"));
});