Hi I\'m using Bootstrap for the first time and I can\'t get my modal form to stay open on clicking the submit button. I\'ve searched SO but all related questions deal with slig
I ran into the similar problem where I use modal as a form so I cannot initially set data-backdrop="static" data-keyboard="false"
because I want the user to be able to close it as long as he has not submitted the form. Once he has submitted the form, I want to prevent him from closing the form modal. Here is how I can get around.
$('#modalForm').on('submit', function() {
$(#modal).on('hide.bs.modal', function ( e ) {
e.preventDefault();
})
});