[html5] r5621 - [e] (0) new example of nested disabled fieldsets Fixing http://www.w3.org/Bugs/P [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Oct 14 00:40:20 PDT 2010


Author: ianh
Date: 2010-10-14 00:40:19 -0700 (Thu, 14 Oct 2010)
New Revision: 5621

Modified:
   complete.html
   index
   source
Log:
[e] (0) new example of nested disabled fieldsets
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10909

Modified: complete.html
===================================================================
--- complete.html	2010-10-13 20:18:57 UTC (rev 5620)
+++ complete.html	2010-10-14 07:40:19 UTC (rev 5621)
@@ -214,7 +214,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Draft Standard — 13 October 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 14 October 2010</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -37766,7 +37766,44 @@
 
   </div>
 
+  <div class=example>
 
+   <p>You can also nest <code><a href=#the-fieldset-element>fieldset</a></code> elements. Here is an
+   example expanding on the previous one that does so:</p>
+
+   <pre><fieldset name="clubfields" disabled>
+ <legend> <label>
+  <input type=checkbox name=club onchange="form.clubfields.disabled = !checked">
+  Use Club Card
+ </label> </legend>
+ <p><label>Name on card: <input name=clubname required></label></p>
+ <fieldset name="numfields">
+  <legend> <label>
+   <input type=radio checked name=clubtype onchange="form.numfields.disabled = !checked">
+   My card has numbers on it
+  </label> </legend>
+  <p><label>Card number: <input name=clubnum required pattern="[-0-9]+"></label></p>
+ </fieldset>
+ <fieldset name="letfields" disabled>
+  <legend> <label>
+   <input type=radio name=clubtype onchange="form.letfields.disabled = !checked">
+   My card has letters on it
+  </label> </legend>
+  <p><label>Card code: <input name=clublet required pattern="[A-Za-z]+"></label></p>
+ </fieldset>
+</fieldset></pre>
+
+   <p>In this example, if the outer "Use Club Card" checkbox is not
+   checked, everything inside the outer <code><a href=#the-fieldset-element>fieldset</a></code>,
+   including the two radio buttons in the legends of the two nested
+   <code><a href=#the-fieldset-element>fieldset</a></code>s, will be disabled. However, if the checkbox
+   is checked, then the radio buttons will both be enabled and will
+   let you select which of the two inner <code><a href=#the-fieldset-element>fieldset</a></code>s is to
+   be enabled.</p>
+
+  </div>
+
+
   <h4 id=the-legend-element><span class=secno>4.10.5 </span>The <dfn><code>legend</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>

Modified: index
===================================================================
--- index	2010-10-13 20:18:57 UTC (rev 5620)
+++ index	2010-10-14 07:40:19 UTC (rev 5621)
@@ -218,7 +218,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1>HTML5 (including next generation additions still in development)</h1>
-    <h2 class="no-num no-toc">Draft Standard — 13 October 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 14 October 2010</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -37746,7 +37746,44 @@
 
   </div>
 
+  <div class=example>
 
+   <p>You can also nest <code><a href=#the-fieldset-element>fieldset</a></code> elements. Here is an
+   example expanding on the previous one that does so:</p>
+
+   <pre><fieldset name="clubfields" disabled>
+ <legend> <label>
+  <input type=checkbox name=club onchange="form.clubfields.disabled = !checked">
+  Use Club Card
+ </label> </legend>
+ <p><label>Name on card: <input name=clubname required></label></p>
+ <fieldset name="numfields">
+  <legend> <label>
+   <input type=radio checked name=clubtype onchange="form.numfields.disabled = !checked">
+   My card has numbers on it
+  </label> </legend>
+  <p><label>Card number: <input name=clubnum required pattern="[-0-9]+"></label></p>
+ </fieldset>
+ <fieldset name="letfields" disabled>
+  <legend> <label>
+   <input type=radio name=clubtype onchange="form.letfields.disabled = !checked">
+   My card has letters on it
+  </label> </legend>
+  <p><label>Card code: <input name=clublet required pattern="[A-Za-z]+"></label></p>
+ </fieldset>
+</fieldset></pre>
+
+   <p>In this example, if the outer "Use Club Card" checkbox is not
+   checked, everything inside the outer <code><a href=#the-fieldset-element>fieldset</a></code>,
+   including the two radio buttons in the legends of the two nested
+   <code><a href=#the-fieldset-element>fieldset</a></code>s, will be disabled. However, if the checkbox
+   is checked, then the radio buttons will both be enabled and will
+   let you select which of the two inner <code><a href=#the-fieldset-element>fieldset</a></code>s is to
+   be enabled.</p>
+
+  </div>
+
+
   <h4 id=the-legend-element><span class=secno>4.10.5 </span>The <dfn><code>legend</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>

Modified: source
===================================================================
--- source	2010-10-13 20:18:57 UTC (rev 5620)
+++ source	2010-10-14 07:40:19 UTC (rev 5621)
@@ -42053,7 +42053,44 @@
 
   </div>
 
+  <div class="example">
 
+   <p>You can also nest <code>fieldset</code> elements. Here is an
+   example expanding on the previous one that does so:</p>
+
+   <pre><fieldset name="clubfields" disabled>
+ <legend> <label>
+  <input type=checkbox name=club onchange="form.clubfields.disabled = !checked">
+  Use Club Card
+ </label> </legend>
+ <p><label>Name on card: <input name=clubname required></label></p>
+ <fieldset name="numfields">
+  <legend> <label>
+   <input type=radio checked name=clubtype onchange="form.numfields.disabled = !checked">
+   My card has numbers on it
+  </label> </legend>
+  <p><label>Card number: <input name=clubnum required pattern="[-0-9]+"></label></p>
+ </fieldset>
+ <fieldset name="letfields" disabled>
+  <legend> <label>
+   <input type=radio name=clubtype onchange="form.letfields.disabled = !checked">
+   My card has letters on it
+  </label> </legend>
+  <p><label>Card code: <input name=clublet required pattern="[A-Za-z]+"></label></p>
+ </fieldset>
+</fieldset></pre>
+
+   <p>In this example, if the outer "Use Club Card" checkbox is not
+   checked, everything inside the outer <code>fieldset</code>,
+   including the two radio buttons in the legends of the two nested
+   <code>fieldset</code>s, will be disabled. However, if the checkbox
+   is checked, then the radio buttons will both be enabled and will
+   let you select which of the two inner <code>fieldset</code>s is to
+   be enabled.</p>
+
+  </div>
+
+
   <h4>The <dfn><code>legend</code></dfn> element</h4>
 
   <dl class="element">




More information about the Commit-Watchers mailing list