HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/3814

File a bug

SVNBugCommentTime (UTC)
3814<form>, <fieldset> examples2009-09-12 08:44
Index: source
===================================================================
--- source	(revision 3813)
+++ source	(revision 3814)
@@ -33692,8 +33692,22 @@
 
   </div>
 
+  <div class="example">
 
+   <p>This example shows two search forms:</p>
 
+   <pre>&lt;form action="http://www.google.com/search" method="get">
+ &lt;label>Google: &lt;input type="search" name="q">&lt;/label> &lt;input type="submit" value="Search...">
+&lt;/form>
+&lt;form action="http://www.bing.com/search" method="get">
+ &lt;label>Bing: &lt;input type="search" name="q">&lt;/label> &lt;input type="submit" value="Search...">
+&lt;/form></pre>
+
+  </div>
+
+
+
+
   <h4>The <dfn><code>fieldset</code></dfn> element</h4>
 
   <dl class="element">
@@ -33800,8 +33814,27 @@
 
   </div>
 
+  <div class="example">
 
+   <p>The following snippet shows a fieldset with a checkbox in the
+   legend that controls whether or not the fieldset is enabled. The
+   contents of the fieldset consist of two required text fields and an
+   optional year/month control.</p>
 
+   <pre>&lt;fieldset name="clubfields" disabled>
+ &lt;legend> &lt;label>
+  &lt;input type=checkbox name=club onchange="form.clubfields.disabled = !checked">
+  Use Club Card
+ &lt;/label> &lt;/legend>
+ &lt;p>&lt;label>Name on card: &lt;input name=clubname required>&lt;/label>&lt;/p>
+ &lt;p>&lt;label>Card number: &lt;input name=clubnum required pattern="[-0-9]+">&lt;/label>&lt;/p>
+ &lt;p>&lt;label>Expiry date: &lt;input name=clubexp type=month>&lt;/label>&lt;/p>
+&lt;/fieldset></pre>
+
+  </div>
+
+
+
   <h4>The <dfn><code>label</code></dfn> element</h4>
 
   <dl class="element">

|