W3C home > Mailing lists > Public > public-html-comments@w3.org > January 2008

Tristate Checkbox Thoughts

From: Hardacre, Richard <Richard.Hardacre@uk.qioptiq.com>
Date: Wed, 9 Jan 2008 10:28:35 -0000
Message-ID: <0621CE6F7F4FF4489C0E4D9F19B154AB28F86E@stass11910.ad.local>
To: <public-html-comments@w3.org>
Cc: "Jones, Ynyr" <Ynyr.Jones@uk.qioptiq.com>
I've been searching around for details regarding the possible implimentation of a WebForms native tristate checkbox in HTML5, the discussions I have found (e.g. http://krijnhoetmer.nl/irc-logs/html-wg/20070914) revolve around how to submit an indeterminate state and exactly why a form would need to submit it.

In answer to the latter point I am developing software which shows a list of results within a query and one of the attributes is a boolean. In order to allow the user to paginate and filter the lists a tri-state checkbox is needed to allow the user to

"Show only true"
"Show only false"
"Show all"

The current solution to this is to use a SELECT to submit the user's preference but I would argue that in this instance a tristate (aligned with the grid's relevant column) would be clearer to the user.

Regarding the primary issue: how to submit the indeterminate value i  prefer the above discussions' solution of extra values to be sent in a manner similar to the following:

<input type="checkbox" name="filter" value="true" tristate="all">

therefore in the indeterminate case the form would submit "filter=all". If the user were to specify the "tristate" attribute it could in compliant UAs enable the trisate mode whilst being safely ignored in UAs that can only deal with standard checkboxes - thus allowing a degree of flexibility in implimentations across devices.

Hope this is useful to someone

Ric Hardacre
MS.Net Professional - HTML/CSS/JS Hacker since the dawn of the web :-)

This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person.

Qioptiq Ltd
Registered Office Glascoed Road, St. Asaph, Denbighshire LL17 0LL
Registered in England & Wales Company Number 876004
Received on Wednesday, 9 January 2008 14:38:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:24 UTC