W3C home > Mailing lists > Public > www-html@w3.org > December 2003

Values of disabled form elements not submitted

From: Markus Ernst <derernst@gmx.ch>
Date: Thu, 11 Dec 2003 10:47:31 +0100
Message-ID: <007e01c3bfcb$cbb15a50$2101a8c0@kusi>
To: <www-html@w3.org>

Hi

According to the HTML 4.0 specification values of form elements with the
disabled control are not submitted with the form. I don't see a reason for
this, as the only reason for the existence of a form element is to submit
it's value. If the value is not needed it can also be displayed as text.

In an application there might be forms with elements that are active in some
cases but inactive in others. Still it's important to display the whole form
for consistence reasons, and still the value is needed. The most consistent
way of display is what UAs display when an element has the disabled control
(greyed out display).

All workarounds are not satisfactory:
- Javascript trickery does not work on non-Javascript browsers
- Readonly elements are not greyed out on many UAs which is confusing
- Readonly control is not applicable to select elements anyway
- Adding a hidden field containing the value ends up in 2 elements with the
same name (or in server-side trickery to check for the existence of a value
and replacing it with the other...)

Additionally it would be no loss if a value is transmitted but not needed,
but the actual spec causes that needed values are not transmitted.

For these reasons I suggest to change the specification of the disabled
control in future versions of HTML/XHTML the way that the name/value pair of
these elements are submitted with the form.

-- 
Markus
Received on Thursday, 11 December 2003 04:50:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:59 GMT