Show a Modal Window on Form Submit and Submit form While Modal "Accept" Button is clicked?
Tag : jquery , By : user183289
Date : March 29 2020, 07:55 AM
it helps some times Does this help? basically you need a "flag" to say the agreement was made, and then submit the form. I've shown a data-attribute being used as it's neat and simple. I've not tested this code but it's logically sound. $('#f').on('submit', function(e) {
if( $(this).data('form-agree') !== true ) {
e.preventDefault();
// fire modal logic here.
}
});
$('#agreesubmit').on('click', function() {
$('#f').data('form-agree', true).submit();
});
|
Fire a remote bootstrap modal when clicking a form submit button, remote modal content then has form data to be displaye
Tag : html , By : Boyer C.
Date : March 29 2020, 07:55 AM
Any of those help Was able to make it work but not remotely Bootstrap 3 buttons are submit type by default, so I used a standard one that fired a modal... button#submit.btn.btn-primary(name='submit' data-toggle="modal" data-target="#myModal") Submit
.modal.fade(id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true")
.modal-dialog.wide-modal
.modal-content
.modal-header
button.close(type='button', data-dismiss='modal', aria-hidden='true') ×
h4.myModalLabel.modal-title
| #{title}
.modal-body
#container(style="width:90%; height:400px;")
.modal-footer
button.btn.btn-primary(type='button', data-dismiss='modal') Close
script.
$(document).ready(function(){
if(#{strikeprices}){
$('#myModal').modal('show')
}
$('body').on('hidden.bs.modal', '.modal', function () {
$(this).removeData('bs.modal');
});
});
|
How to Submit other Modal form on Submit Button click of Current Modal
Date : March 29 2020, 07:55 AM
this one helps. I have a Bootstrap Modal which contains a Submit Button.Apart from this Modal I have another one also which contains Form and other elements like Lables, Text boxes and a Submit button.Now I have a requirement where in a click Submit button of first Modal , it should submit the Form of the Second Modal..Below I am posting my First and Second Modal HTML Prototype .. , Adding a class to delete button <button type="submit" class="btn btn-success delete"><i class="glyphicon glyphicon-trash"></i> Delete</button>
$('.delete').on('click',function(){
$('#DeleteModal').modal('hide');
$("#frmStudent").submit();
});
|
Blazor EditForm Submit handler not called when the form is in a bootstrap modal end the submit button is the modal dismi
Date : March 29 2020, 07:55 AM
seems to work fine Your biggest issue is using bootstrap as is. BS uses it’s own JS to manipulate the DOM, this won’t work with Blazor as Blazor needs to control the DOM. Same as Angular, React or Vue. If something else modifies the DOM then odd things can happen, as you’re finding. I would suggest swapping to one of the Blazor-fied bootstrap libraries such as BlazorStrap. Or if you’re just after a modal I’ve written one called Blazored.Modal
|
how to remove the default focus on submit button in HTML form?
Date : March 29 2020, 07:55 AM
|