Form submission is a synchronous action, so when you submit a form and then immediately submit a different form in your page, the first form's submission is canceled.
What you can do instead is make sure the forms are submitted asynchronous (using ajax):
$(function() {
$("#allsubmit").click(function(){
$('.allforms').each(function(){
valuesToSend = $(this).serialize();
$.ajax($(this).attr('action'),
{
method: $(this).attr('method'),
data: valuesToSend
}
)
});
});
});
A few notes
- This will not work with forms that have file-uploading (enctype="multipart/form-data")
- You need to decide what to do after the submission is done (because nothing in the page will change).
- You can't submit forms in stackoverflow-snippets, so don't try to run this here :)