Can you serialize multiple forms into one so that only one post or ajax request is made? I have searched around and it is all for submiting each form separently via post/ajax.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you use the jQuery
serialize()function, it simply turns your form into a string in the formata=1&b=2&c=3. So you can certainly apply this function to two forms and concatenate the result, with an&between them, and use the result in your ajax call. You’d want some checks to make sure neither string is empty when you do the concatenation.