[html5] r3322 - [e] (0) example for formnovalidate

whatwg at whatwg.org whatwg at whatwg.org
Thu Jun 25 22:39:41 PDT 2009


Author: ianh
Date: 2009-06-25 22:39:40 -0700 (Thu, 25 Jun 2009)
New Revision: 3322

Modified:
   index
   source
Log:
[e] (0) example for formnovalidate

Modified: index
===================================================================
--- index	2009-06-26 05:18:15 UTC (rev 3321)
+++ index	2009-06-26 05:39:40 UTC (rev 3322)
@@ -31698,6 +31698,10 @@
   <p>The <code title=attr-fs-formaction><a href=#attr-fs-formaction>formaction</a></code>, <code title=attr-fs-formenctype><a href=#attr-fs-formenctype>formenctype</a></code>, <code title=attr-fs-formmethod><a href=#attr-fs-formmethod>formmethod</a></code>, <code title=attr-fs-formnovalidate><a href=#attr-fs-formnovalidate>formnovalidate</a></code>, and <code title=attr-fs-formtarget><a href=#attr-fs-formtarget>formtarget</a></code> attributes are <a href=#attributes-for-form-submission>attributes
   for form submission</a>.</p>
 
+  <p class=note>The <code title=attr-fs-formnovalidate><a href=#attr-fs-formnovalidate>formnovalidate</a></code> attribute can
+  be used to make submit buttons that do not trigger the constraint
+  validation.</p>
+
   <div class="bookkeeping impl">
 
    <p>The following common <code><a href=#the-input-element>input</a></code> element content
@@ -33006,6 +33010,10 @@
   attribute controls focus. The <code title=attr-fs-formaction><a href=#attr-fs-formaction>formaction</a></code>, <code title=attr-fs-formenctype><a href=#attr-fs-formenctype>formenctype</a></code>, <code title=attr-fs-formmethod><a href=#attr-fs-formmethod>formmethod</a></code>, <code title=attr-fs-formnovalidate><a href=#attr-fs-formnovalidate>formnovalidate</a></code>, and <code title=attr-fs-formtarget><a href=#attr-fs-formtarget>formtarget</a></code> attributes are
   <a href=#attributes-for-form-submission>attributes for form submission</a>.</p>
 
+  <p class=note>The <code title=attr-fs-formnovalidate><a href=#attr-fs-formnovalidate>formnovalidate</a></code> attribute can
+  be used to make submit buttons that do not trigger the constraint
+  validation.</p>
+
   <p>The <dfn id=attr-button-value title=attr-button-value><code>value</code></dfn>
   attribute gives the element's value for the purposes of form
   submission. The <code title=attr-button-value><a href=#attr-button-value>value</a></code>
@@ -34773,6 +34781,27 @@
   is present, or if the element's <a href=#form-owner>form owner</a>'s <code title=attr-fs-novalidate><a href=#attr-fs-novalidate>novalidate</a></code> attribute is present,
   and false otherwise.</p>
 
+  <div class=example>
+
+   <p>This attribute is useful to include "save" buttons on forms that
+   have validation constraints, to allow users to save their progress
+   even though they haven't fully entered the data in the form. The
+   following example shows a simple form that has two required
+   fields. There are three buttons: one to submit the form, which
+   requires both fields to be filled in; one to save the form so that
+   the user can come back and fill it in later; and one to cancel the
+   form altogether.</p>
+
+   <pre><form action="editor.cgi" method="post">
+ <p><label>Name: <input required name=fn></label></p>
+ <p><label>Essay: <textarea name=essay></label></p>
+ <p><input type=submit name=submit value="Submit essay"></p>
+ <p><input type=submit formnovalidate name=save value="Save essay"></p>
+ <p><input type=submit formnovalidate name=cancel value="Cancel"></p>
+</form></pre>
+
+  </div>
+
   <div class=impl>
 
   <hr><p>The <dfn id=dom-fs-action title=dom-fs-action><code>action</code></dfn>, <dfn id=dom-fs-method title=dom-fs-method><code>method</code></dfn>, <dfn id=dom-fs-enctype title=dom-fs-enctype><code>enctype</code></dfn>, and <dfn id=dom-fs-target title=dom-fs-target><code>target</code></dfn> DOM attributes must
@@ -71330,6 +71359,7 @@
   Johan Herland,
   John Boyer,
   John Bussjaeger,
+  John Carpenter,
   John Fallows,
   John Harding,
   John Keiser,

Modified: source
===================================================================
--- source	2009-06-26 05:18:15 UTC (rev 3321)
+++ source	2009-06-26 05:39:40 UTC (rev 3322)
@@ -35222,6 +35222,11 @@
   title="attr-fs-formtarget">formtarget</code> attributes are <span>attributes
   for form submission</span>.</p>
 
+  <p class="note">The <code
+  title="attr-fs-formnovalidate">formnovalidate</code> attribute can
+  be used to make submit buttons that do not trigger the constraint
+  validation.</p>
+
   <div class="bookkeeping impl">
 
    <p>The following common <code>input</code> element content
@@ -36803,6 +36808,11 @@
   title="attr-fs-formtarget">formtarget</code> attributes are
   <span>attributes for form submission</span>.</p>
 
+  <p class="note">The <code
+  title="attr-fs-formnovalidate">formnovalidate</code> attribute can
+  be used to make submit buttons that do not trigger the constraint
+  validation.</p>
+
   <p>The <dfn title="attr-button-value"><code>value</code></dfn>
   attribute gives the element's value for the purposes of form
   submission. The <code title="attr-button-value">value</code>
@@ -38945,6 +38955,27 @@
   title="attr-fs-novalidate">novalidate</code> attribute is present,
   and false otherwise.</p>
 
+  <div class="example">
+
+   <p>This attribute is useful to include "save" buttons on forms that
+   have validation constraints, to allow users to save their progress
+   even though they haven't fully entered the data in the form. The
+   following example shows a simple form that has two required
+   fields. There are three buttons: one to submit the form, which
+   requires both fields to be filled in; one to save the form so that
+   the user can come back and fill it in later; and one to cancel the
+   form altogether.</p>
+
+   <pre><form action="editor.cgi" method="post">
+ <p><label>Name: <input required name=fn></label></p>
+ <p><label>Essay: <textarea name=essay></label></p>
+ <p><input type=submit name=submit value="Submit essay"></p>
+ <p><input type=submit formnovalidate name=save value="Save essay"></p>
+ <p><input type=submit formnovalidate name=cancel value="Cancel"></p>
+</form></pre>
+
+  </div>
+
   <div class="impl">
 
   <hr>
@@ -84151,6 +84182,7 @@
   Johan Herland,
   John Boyer,
   John Bussjaeger,
+  John Carpenter,
   John Fallows,
   John Harding,
   John Keiser,




More information about the Commit-Watchers mailing list