I am planning on setting up multiple forms on a page and wanted to make sure that this is ok. Do submit buttons act only on the form they are inside of or do they apply to all the forms on a page?
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.
A submit button submits a form. It seems that the specifications do not clearly say that this means the enclosing
formelement, probably because this was taken as self-evident. And it’s certainly what browsers do.HTML5 drafts make this a bit clearer by introducing the concept of “form owner” of a field (such as a submit button). By default, the form owner is the enclosing
formelement, though the proposedformattribute of a field could change this. And a submit button is defined as submitting the form owner.