[Bug 23124] New: input type="checkbox" should always provide value for GET, POST, consistency

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23124

            Bug ID: 23124
           Summary: input type="checkbox" should always provide value for
                    GET, POST, consistency
    Classification: Unclassified
           Product: HTML WG
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: HTML5 spec
          Assignee: dave.null@w3.org
          Reporter: jmichae3@yahoo.com
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-admin@w3.org,
                    public-html-wg-issue-tracking@w3.org

currently, <input type="checkbox" name="ienableTax" checked> gives the value
ienableTax=on in the URL.
if it's not checked, nothing is put in the URL for GET.

expected: I think it should always give a value in URL no matter the state. I
was thinking of off for a an unchecked value. this would make the values
mnemonic, on and off, which also makes it more intuitive ti programmers. 

programmers who are new to the forms controls expect that it should always have
a value and are surprised when it doesn't and their programs that they thought
would work suddenly break. even in js, .checked always has a value (true,
false).

it is difficult to detect the presence of something that's not there.

- this would me a major change. 
- it would break existing working sites. 
- once a change such as this has been put in, it will be easier to develop web
sites.
- even in POST, this same problem persists and is causing developers problems
in PHP etc with needless posted bug reports around the globe probably. why?
checkbox's I/O behavior in GET and POST is inconsistent with the rest of the
form controls, which other controls always have a value POSTed/GETted.


use case:
I have
http://JesusnJim.com/calculators/finances/calculator-with-estimator-to-save-up-for-item.html

it is a plain DHTML program and uses a function setidvalfromurlargs(); in
/geturlargs.js to use the URL arguments to set the id's. (I can do the same
with names).
I wanted client-only functionality with support for GET in HTML. and I got it.
however, because the checkbox doesn't exist in the GET arguments (the URL)
after a submit if it's unchecked, this function doesn't see anything for that
variable so it doesn't know to set anything for that variable.

the function simply does whatever variables are listed in the URL.

I don't have the time to customize and maintain a new function and
individualized list of element names for every web page I create. I have about
20-30 calculators, and they are growing.

====
php examples in php documentation at php.net on forms control handling would
have to change of course, which would probably be just a new entry in the
comments.

if this gets rejected I will understand completely. 
if it gets passed then I will be very happy.
it's a hopeful ask for consistency.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Monday, 2 September 2013 08:20:12 UTC