Multiple forms are placed on a single page and are submitted via jquery. The code that submits the form is simple:
$("form").submit(function() {
});
The issue I am having is having a select group of forms run with this code. I have tried the following with success:
$("#form1,#form2,#form3").submit(function() {
});
However, is it possible select multiple forms with a single id/identifier?
Additionally, when using multiple ids to select form1, form2, and form3, what data is submitted? I have a hidden field located in form1 but it seems as if that data is sent when form2 is submitted. How can I correct this?
Thank you in advance.
1 Answer