Reputation: 1472
Is it possible to attach an input element to more than one form? I know HTML5 allows you to specify a form an element belongs to by form's ID. But is it possible to attach it to like multiple ID's?
It seems nice to do all that without any javascript/JQuery, which is the alternative.
Upvotes: 9
Views: 5864
Reputation: 943510
No, a form control can be associated with only one form.
From w3c specification:
If a reassociateable form-associated element has a form attribute specified, then that attribute's value must be the ID of a form element in the element's owner Document.
You can use a single, large form and decide (on the server) which inputs to pay attention to based on which submit button was pressed.
Upvotes: 11