Dorokhov.codes
Snippets
How to send a form from a Bootstrap modal window:
$(function () {
$(".submit-modal-form-button").on('click', function() {
$(this).closest('.modal-content').find('.modal-body form').submit();
});
});
We need to add a CSS class submit-modal-form-button
.
Or without it:
$('.modal-footer button:last-child').click(function() {
$(this).closest('.modal-content').find('.modal-body form').submit();
});