There are a lot of form tags with the same name on the same page, when I click submit on one of them what is the expected behavior?
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.
If you have multiple forms with the same name it won’t make a difference, only the form which contains the submit button that was pressed will be submitted. The form name is not actually referenced in the GET or POST request the FORM makes after being submitted.
If you are submitting the FORM via javascript the behavior may vary. Even then having duplicate names won’t make a difference as long as you reference the forms by unique IDs. In the event of attempting to reference multiple forms by the matching FORM names and submitting them via javascript you would most likely get a javascript error or the first/last form of the set would be submitted depending on the browsers behavior.