I have multiple forms on my page. When I click the forms submit button, I want to send the form value of only that form through ajax. Here is what I have. The first form w
First, use class in your submit buttons. Be aware that ids are unique (by w3c specs)
Then in your onclick listener, get the form using closest (same as parent but targeting a specific parent; in this case it is the form element). Here is the working code: