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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With