Skip to content
Permalink
Browse files

[] (0) WF2: More things that make form controls not be submitted.

git-svn-id: http://svn.whatwg.org/webapps@2163 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Sep 11, 2008
1 parent 193893d commit 840d17c9d0041237f89f238d7770184a917f0ca7
Showing with 117 additions and 52 deletions.
  1. +76 −44 index
  2. +41 −8 source
120 index
@@ -28,7 +28,7 @@

<h1 id=html-5>HTML 5</h1>

<h2 class="no-num no-toc" id=draft>Draft Recommendation &mdash; 10
<h2 class="no-num no-toc" id=draft>Draft Recommendation &mdash; 11
September 2008</h2>

<p>You can take part in this work. <a
content attribute with a matching <code title=dom-fae-form><a
href="#form1">form</a></code> DOM attribute.

<p>The controls that end up being submitted back to the server are <dfn
<p>The controls that can end up being submitted back to the server are <dfn
id=field title=category-field>field elements</dfn>.

<p>The controls that are exposed to the <code title=dom-form-elements><a
title=category-listed-form-element>listed form elements</dfn>. This is a
superset of the <a href="#field" title=category-field>field elements</a>.

<p>Some <a href="#field" title=category-field>field elements</a> can be,
depending on their attributes, <dfn id=buttons
title=concept-button>buttons</dfn>. The prose below defines when an
element is a button.

<h4 id=the-form><span class=secno>4.9.1 </span>The <dfn
id=form><code>form</code></dfn> element</h4>

whose <a href="#form-owner">form owner</a> is the <code><a
href="#form">form</a></code> element, with the exception of <code><a
href="#input0">input</a></code> elements whose <code
title=attr-input-type>type</code> attribute is in the <span>Image
Button</span> state, which must, for historical reasons, be excluded from
this particular collection.
title=attr-input-type>type</code> attribute is in the <span
title=attr-input-type-image-state>Image Button</span> state, which must,
for historical reasons, be excluded from this particular collection.

<p>The <dfn id=length6 title=dom-form-length><code>length</code></dfn> DOM
attribute must return the number of nodes <a href="#represents"

<p class=big-issue>...

<p class=big-issue>... <dfn id=checked
title=concept-input-checked>checked</dfn>

<h4 id=the-button><span class=secno>4.9.4 </span>The <dfn
id=button><code>button</code></dfn> element</h4>

order</a>.

<li>
<p>Let the <dfn id=form-data><var>form data set</var></dfn> be a list of
name/value pairs, initially empty.
<p>Let the <var title="">form data set</var> be a list of name/value
pairs, initially empty.

<li>
<p>For each element <var title="">field</var> in <var
href="#name9">name</a></code> attribute's value is the empty string,
and it is not an <code><a href="#input0">input</a></code> elements
whose <code title=attr-input-type>type</code> attribute is in the
<span>Image Button</span> state.
<span title=attr-input-type-image-state>Image Button</span> state.

<li>The <var title="">field</var> element is <a href="#disabled2"
title=concept-fe-disabled>disabled</a>.

<li class=big-issue>...
<li>The <var title="">field</var> element is a <a href="#buttons"
title=concept-button>button</a> but it is not <var
title="">submitter</var>.

<li>The <var title="">field</var> element is an <code><a
href="#input0">input</a></code> element whose <code
title=attr-input-type>type</code> attribute is in the <span
title=attr-input-type-checkbox-state>Checkbox</span> state and the
control is not <a href="#checked"
title=concept-input-checked>checked</a>.

<li>The <var title="">field</var> element is an <code><a
href="#input0">input</a></code> element whose <code
title=attr-input-type>type</code> attribute is in the <span
title=attr-input-type-radio-state>Radio Button</span> state and the
control is not <a href="#checked"
title=concept-input-checked>checked</a>.

<li>The <var title="">field</var> element is an <code><a
href="#input0">input</a></code> element whose <code
title=attr-input-type>type</code> attribute is in the <span
title=attr-input-type-file-state>File Upload</span> state but the
control does not have any files selected.
</ul>

<li class=big-issue>...
</ol>

<li>
<th>Description

<tr>
<td><!--checked--><dfn id=checked
<td><!--checked--><dfn id=checked0
title=datagrid-cell-class-checked><code>checked</code></dfn>

<td>Cells
title=datagrid-cell-class-progress><a
href="#progress1">progress</a></code>, <code
title=datagrid-cell-class-checked><a
href="#checked">checked</a></code>, <code
href="#checked0">checked</a></code>, <code
title=datagrid-cell-class-checked><a
href="#checked">unchecked</a></code> and <code
href="#checked0">unchecked</a></code> and <code
title=datagrid-cell-class-checked><a
href="#checked">indeterminate</a></code> classes override this,
href="#checked0">indeterminate</a></code> classes override this,
though.)

<tr>

<td>The cell has a checkbox, and it can be set to an indeterminate
state. If neither the <code title=datagrid-cell-class-checked><a
href="#checked">checked</a></code> nor <code
href="#checked0">checked</a></code> nor <code
title=datagrid-cell-class-checked><a
href="#checked">unchecked</a></code> classes are present, then the
href="#checked0">unchecked</a></code> classes are present, then the
checkbox is in that state, too. (The <code
title=datagrid-cell-class-cyclable><a
href="#cyclable">cyclable</a></code> and <code
<td>Cells

<td>The cell has a checkbox and, unless the <code
title=datagrid-cell-class-checked><a href="#checked">checked</a></code>
class is present as well, it is unchecked. (The <code
title=datagrid-cell-class-cyclable><a
title=datagrid-cell-class-checked><a
href="#checked0">checked</a></code> class is present as well, it is
unchecked. (The <code title=datagrid-cell-class-cyclable><a
href="#cyclable">cyclable</a></code> and <code
title=datagrid-cell-class-progress><a
href="#progress1">progress</a></code> classes override this, though.)
<p>The <code title=dom-provider-getCellClasses><a
href="#getcellclasses">getCellClasses()</a></code> method must add the
<code title=datagrid-cell-class-checked><a
href="#checked">checked</a></code> class if the <code><a
href="#checked0">checked</a></code> class if the <code><a
href="#input0">input</a></code> element is <span
title=dom-input-checked>checked</span>, and the <code
title=datagrid-cell-class-unchecked><a
<dt id=cellType2>To establish how a simple text cell should be presented

<dd>Check whether one of the <code title=datagrid-cell-class-checked><a
href="#checked">checked</a></code>, <code
href="#checked0">checked</a></code>, <code
title=datagrid-cell-class-unchecked><a
href="#unchecked">unchecked</a></code>, or <code
title=datagrid-cell-class-indeterminate><a
<dt>To establish the state of a cell's checkbox, if it has one

<dd>Check whether the <code title=datagrid-cell-class-checked><a
href="#checked">checked</a></code> class applies to the cell. If it does,
the cell is checked. Otherwise, check whether the <code
href="#checked0">checked</a></code> class applies to the cell. If it
does, the cell is checked. Otherwise, check whether the <code
title=datagrid-cell-class-unchecked><a
href="#unchecked">unchecked</a></code> class applies to the cell. If it
does, the cell is unchecked. Otherwise, the <code
href="#indeterminate">indeterminate</a></code> class applies to the cell,
the checkbox is a tristate checkbox, and the user can set it to the
indeterminate state. Otherwise, only the <code
title=datagrid-cell-class-checked><a href="#checked">checked</a></code>
title=datagrid-cell-class-checked><a href="#checked0">checked</a></code>
and/or <code title=datagrid-cell-class-unchecked><a
href="#unchecked">unchecked</a></code> classes apply to the cell, and the
cell can only be toggled between those two states.
href="#disabled7">disabled</a></code>

<dd><code title=attr-command-checked><a
href="#checked0">checked</a></code>
href="#checked1">checked</a></code>

<dd><code title=attr-command-radiogroup><a
href="#radiogroup">radiogroup</a></code>
attribute DOMString <a href="#label1" title=dom-command-label>label</a>;
attribute DOMString <a href="#icon0" title=dom-command-icon>icon</a>;
attribute boolean <a href="#disabled8" title=dom-command-disabled>disabled</a>;
attribute boolean <a href="#checked1" title=dom-command-checked>checked</a>;
attribute boolean <a href="#checked2" title=dom-command-checked>checked</a>;
attribute DOMString <a href="#radiogroup0" title=dom-command-radiogroup>radiogroup</a>;
attribute boolean <a href="#default3" title=dom-command-default>default</a>;
void <a href="#click" title=dom-command-click>click</a>(); // shadows <code><a href="#htmlelement">HTMLElement</a></code>.<code title=dom-click><a href="#click1">click()</a></code>
the faucet is already open, but the command "eat" would be marked hidden
since the faucet could never be eaten.

<p>The <dfn id=checked0
<p>The <dfn id=checked1
title=attr-command-checked><code>checked</code></dfn> attribute is a <a
href="#boolean0">boolean attribute</a> that, if present, indicates that
the command is selected.
<p>The <dfn id=type14 title=dom-command-type><code>type</code></dfn>, <dfn
id=label1 title=dom-command-label><code>label</code></dfn>, <dfn id=icon0
title=dom-command-icon><code>icon</code></dfn>, <dfn id=disabled8
title=dom-command-disabled><code>disabled</code></dfn>, <dfn id=checked1
title=dom-command-disabled><code>disabled</code></dfn>, <dfn id=checked2
title=dom-command-checked><code>checked</code></dfn>, <dfn id=radiogroup0
title=dom-command-radiogroup><code>radiogroup</code></dfn>, and <dfn
id=default3 title=dom-command-default><code>default</code></dfn> DOM

<dd>
<p>If the element has a <code title=attr-command-checked><a
href="#checked0">checked</a></code> attribute, the UA must remove that
href="#checked1">checked</a></code> attribute, the UA must remove that
attribute. Otherwise, the UA must add a <code
title=attr-command-checked><a href="#checked0">checked</a></code>
title=attr-command-checked><a href="#checked1">checked</a></code>
attribute, with the literal value <code title="">checked</code>. The UA
must then <a href="#firing">fire a <code title="">click</code> event</a>
at the element.
title=attr-command-radiogroup><a
href="#radiogroup">radiogroup</a></code> attributes as if they were the
empty string), and has a <code title=attr-command-checked><a
href="#checked0">checked</a></code> attribute, must remove that
href="#checked1">checked</a></code> attribute, must remove that
attribute and <a href="#firing">fire a <code title="">click</code>
event</a> at the element.</p>

<p>Then, the element's <code title=attr-command-checked><a
href="#checked0">checked</a></code> attribute attribute must be set to
href="#checked1">checked</a></code> attribute attribute must be set to
the literal value <code title="">checked</code> and a <span title="file
a click event"><code title="">click</code> event must be fired</span> at
the element.

<dd>The kind of command: "command", meaning it is a normal command;
"radio", meaning that triggering the command will, amongst other things,
set the <a href="#checked2" title=command-facet-CheckedState>Checked
set the <a href="#checked3" title=command-facet-CheckedState>Checked
State</a> to true (and probably uncheck some other commands); or
"checkbox", meaning that triggering the command will, amongst other
things, toggle the value of the <a href="#checked2"
things, toggle the value of the <a href="#checked3"
title=command-facet-CheckedState>Checked State</a>.

<dt><dfn id=id1 title=command-facet-ID>ID</dfn>

<dd>Whether the command is relevant and can be triggered or not.

<dt><dfn id=checked2 title=command-facet-CheckedState>Checked State</dfn>
<dt><dfn id=checked3 title=command-facet-CheckedState>Checked State</dfn>

<dd>Whether the command is checked or not.

readonly attribute DOMString <a href="#icon2" title=dom-command-ro-icon>icon</a>;
readonly attribute boolean <a href="#hidden0" title=dom-command-ro-hidden>hidden</a>;
readonly attribute boolean <a href="#disabled11" title=dom-command-ro-disabled>disabled</a>;
readonly attribute boolean <a href="#checked3" title=dom-command-ro-checked>checked</a>;
readonly attribute boolean <a href="#checked4" title=dom-command-ro-checked>checked</a>;
void <a href="#click0" title=dom-command-ro-click>click</a>();
readonly attribute <a href="#htmlcollection0">HTMLCollection</a> <a href="#triggers0" title=dom-command-ro-triggers>triggers</a>;
readonly attribute <a href="#command0">Command</a> <span title=dom-command-ro-command>command</span>;
href="#option">option</a></code>, and <code><a
href="#command0">command</a></code> elements.

<p>The <dfn id=checked3
<p>The <dfn id=checked4
title=dom-command-ro-checked><code>checked</code></dfn> attribute must
return true if the command's <a href="#checked2"
return true if the command's <a href="#checked3"
title=command-facet-CheckedState>Checked State</a> is that the command is
checked, and false if it is that the command is not checked. If the
element does not define a command, the attribute must return false. This
State</a> facet of the command is always false. (The command is always
enabled.)

<p>The <a href="#checked2" title=command-facet-CheckedState>Checked
<p>The <a href="#checked3" title=command-facet-CheckedState>Checked
State</a> of the command is always false. (The command is never checked.)

<p>The <a href="#action" title=command-facet-Action>Action</a> of the
title=command-facet-Label>Label</a>, <a href="#hint"
title=command-facet-Hint>Hint</a>, <a href="#icon1"
title=command-facet-Icon>Icon</a>, <a href="#hidden"
title=command-facet-HiddenState>Hidden State</a>, <a href="#checked2"
title=command-facet-HiddenState>Hidden State</a>, <a href="#checked3"
title=command-facet-CheckedState>Checked State</a>, and <a href="#action"
title=command-facet-Action>Action</a> facets of the command are determined
<a href="#using5" title=a-command>as for <code>a</code> elements</a> (see
become disabled at other times too (for example, the <code>move-up</code>
input type is disabled when it would have no effect).

<p>The <a href="#checked2" title=command-facet-CheckedState>Checked
<p>The <a href="#checked3" title=command-facet-CheckedState>Checked
State</a> of the command is true if the command is of <a href="#type19"
title=command-facet-Type>Type</a> "radio" or "checkbox" and the element
has a <code title=attr-input-checked>checked</code> attribute, and false
State</a> of the command is true (disabled) if the element has a <code
title=attr-option-disabled>disabled</code> attribute, and false otherwise.

<p>The <a href="#checked2" title=command-facet-CheckedState>Checked
<p>The <a href="#checked3" title=command-facet-CheckedState>Checked
State</a> of the command is true (checked) if the element's <code
title=dom-option-selected>selected</code> DOM attribute is true, and false
otherwise.
title=attr-command-disabled><a href="#disabled7">disabled</a></code>
attribute, and false otherwise.

<p>The <a href="#checked2" title=command-facet-CheckedState>Checked
<p>The <a href="#checked3" title=command-facet-CheckedState>Checked
State</a> of the command is true (checked) if the element has a <code
title=attr-command-checked><a href="#checked0">checked</a></code>
title=attr-command-checked><a href="#checked1">checked</a></code>
attribute, and false otherwise.

<p>The <a href="#action" title=command-facet-Action>Action</a> of the
href="#type15">type</a></code> attribute's state's <i>relevance</i> is
false, and true otherwise.

<p>The <a href="#checked2" title=command-facet-CheckedState>Checked
<p>The <a href="#checked3" title=command-facet-CheckedState>Checked
State</a> of the command is always false. (The command is never checked.)

<p>The <a href="#action" title=command-facet-Action>Action</a> of the

0 comments on commit 840d17c

Please sign in to comment.
You can’t perform that action at this time.