Multiple form identifier in HTML5 input form attribute

The HTML5 input element includes a 'form' attribute, which can contain one or more space-delimited form identifiers. The following is a simplified example in which both form1 and form2 use an input element.

<form id="form1" method="post"> <input type="submit"> </form> <form id="form2" method="post"> <input type="submit"> </form> <input type="text" form="form1 form2"> 

At least how it should work:
http://swatelier.info/at/forms/HTML5attrib.asp
http://www.w3schools.com/tags/att_input_form.asp

In Chrome 28, I see that adding a second form identifier hides the input element from both forms. What modern browsers, if any, support this functionality?

+6
source share
1 answer

Nowhere in the specification, the value of the form attribute is a list of identifiers of form elements in the document, separated by spaces:

If the associated form-related element has the specified form attribute, then this attribute value must be the identifier of the form element a in the element owner's document.

Source: HTML5 WHATWG Specification

+6
source

Source: https://habr.com/ru/post/950680/


All Articles