This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html Multipage: http://www.whatwg.org/C#attr-fs-formmethod Complete: http://www.whatwg.org/c#attr-fs-formmethod Comment: Remove the missing value default for formmethod="" Posted from: 85.227.154.145 by simonp@opera.com User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.7.3; U; en) Presto/2.10.229 Version/11.64
formmethod should only have an invalid value default, not a missing value default. Consider <form method=post> <input type=submit> </form> input.formMethod will return "get", which is bogus since the attribute isn't specified so the form's method is really "post". With the proposed change, input.formMethod would return the empty string. Since <form method=post> <input type=submit formmethod=invalid> </form> causes the form to use GET, making input.formMethod return "get" there makes sense, and allows for feature detection. The same thing applies to formenctype.
This bug was cloned to create bug 18191 as part of operation convergence.
Checked in as WHATWG revision r7282. Check-in comment: Make .formenctype and .formaction IDL attributes return '' rather than default values when they are not set, to indicate that they defer to the form. http://html5.org/tools/web-apps-tracker?from=7281&to=7282
Ian, I think your change made form.method and form.encoding and form.enctype to follow the reflection rules Simon asked for formControl.formMethod and formControl.formEnctype. I think Simon's proposal really makes sense for .formMethod and .formEnctype reflection but it doesn't make much sense to apply this to HTMLFormElement.{method,enctype,encoding} given that the rationale from comment 1 would not apply (ie. <form></form> will use the 'GET' method).
FWIW, we just landed some code in Gecko to implement's Simon's proposal but without following the change that has been made to the attribute reflection on the form elements. See https://bugzilla.mozilla.org/show_bug.cgi?id=787095
Wow, yeah, dunno what I was thinking there.
Checked in as WHATWG revision r7648. Check-in comment: Fix broken logic around IDL attributes for form submission. http://html5.org/tools/web-apps-tracker?from=7647&to=7648