I do not believe that you can transfer data directly to the modal. However, you can use attributes datato modify the DOM, which can then be read from the event show.bs.modal. Something like that:
$(document).on('click', '#editNominHref', function(e) {
$('#editNomiModal')
.data('row-index', $(this).closest('tr').index())
.modal('show');
});
$('#editNomiModal').on('show.bs.modal', function () {
var $tr = $('#myTable tr').eq($(this).data('row-index'));
var serial = $tr.find('td:eq(0)').text();
var name = $tr.find('td:eq(1)').text();
$("#Serial_field_of_Modal").val(serial);
$("#Name_field_of_Modal").val(name);
});
source
share