- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 14 Oct 2010 07:47:06 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv16107
Modified Files:
forms.html spec.html
Log Message:
new example of nested disabled fieldsets (whatwg r5621)
[updated by splitter]
Index: forms.html
===================================================================
RCS file: /sources/public/html5/spec/forms.html,v
retrieving revision 1.1007
retrieving revision 1.1008
diff -u -d -r1.1007 -r1.1008
--- forms.html 13 Oct 2010 10:16:49 -0000 1.1007
+++ forms.html 14 Oct 2010 07:47:03 -0000 1.1008
@@ -1122,6 +1122,41 @@
<p><label>Expiry date: <input name=clubexp type=month></label></p>
</fieldset></pre>
+ </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>
<dd>None.</dd>
<dt>Contexts in which this element can be used:</dt>
Index: spec.html
===================================================================
RCS file: /sources/public/html5/spec/spec.html,v
retrieving revision 1.1294
retrieving revision 1.1295
diff -u -d -r1.1294 -r1.1295
--- spec.html 13 Oct 2010 20:47:32 -0000 1.1294
+++ spec.html 14 Oct 2010 07:47:03 -0000 1.1295
@@ -367,7 +367,7 @@
<a href="Overview.html">single page HTML</a>,
<a href="spec.html">multipage HTML</a>,
<a href="author/">web developer edition</a>.
-This is revision 1.4496.
+This is revision 1.4497.
</p>
<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
© 2010 <a href="http://www.w3.org/"><abbr title="World Wide
Received on Thursday, 14 October 2010 07:47:07 UTC