[html5] r3645 - [e] (0) A brief and vague introduction to form submission.

whatwg at whatwg.org whatwg at whatwg.org
Mon Aug 17 02:47:24 PDT 2009


Author: ianh
Date: 2009-08-17 02:47:22 -0700 (Mon, 17 Aug 2009)
New Revision: 3645

Modified:
   index
   source
Log:
[e] (0) A brief and vague introduction to form submission.

Modified: index
===================================================================
--- index	2009-08-17 03:03:55 UTC (rev 3644)
+++ index	2009-08-17 09:47:22 UTC (rev 3645)
@@ -35966,7 +35966,7 @@
 
   <p>The corresponding <a href=#attributes-for-form-submission>attributes for form submission</a>
   that may be specified on <a href=#concept-submit-button title=concept-submit-button>submit
-  button</a> are <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>. When omitted, they
+  buttons</a> are <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>. When omitted, they
   default to the values given on the corresponding attributes on the
   <code><a href=#the-form-element>form</a></code> element.</p>
 
@@ -36525,10 +36525,46 @@
 
   <p><i>This section is non-normative.</i></p>
 
-  <p class=XXX> ... </p>
+  <p>When forms are submitted, the data in the form is converted into
+  the form specified by the <a href=#concept-fs-enctype title=concept-fs-enctype>enctype</a>, and then sent to the
+  destination specified by the <a href=#concept-fs-action title=concept-fs-action>action</a> using the given <a href=#concept-fs-method title=concept-fs-method>method</a>.</p>
 
+  <p>For example, take the following form:</p>
 
+  <pre><form action="/find.cgi" method=get>
+ <input type=text name=t>
+ <input type=search name=q>
+ <input type=submit>
+</form></pre>
 
+  <p>If the user types in "cats" in the first field and "fur" in the
+  second, and then hits the submit button, then the user agent will
+  load <code title="">.../find.cgi?t=cats&q=fur</code>.</p>
+
+  <p>On the other hand, consider this form:</p>
+
+  <pre><form action="/find.cgi" method=post enctype="multipart/form-data">
+ <input type=text name=t>
+ <input type=search name=q>
+ <input type=submit>
+</form></pre>
+
+  <p>Given the same user input, the result on submission is quite
+  different: the user agent instead does an HTTP POST to the given
+  URL, with as the entity body something like the following text:</p>
+
+  <pre>------kYFrd4jNJEgCervE
+Content-Disposition: form-data; name="t"
+
+cats
+------kYFrd4jNJEgCervE
+Content-Disposition: form-data; name="q"
+
+fur
+------kYFrd4jNJEgCervE--</pre>
+
+
+
   <div class=impl>
 
   <h5 id=implicit-submission><span class=secno>4.10.16.2 </span>Implicit submission</h5>
@@ -36794,12 +36830,12 @@
     of each column. Then, jump to the steps named in that cell and
     defined below the table.</p>
 
-    <table><tr><td>
+    <table><thead><tr><td>
       <th> <a href=#attr-fs-method-get title=attr-fs-method-GET>GET</a>
       <th> <a href=#attr-fs-method-post title=attr-fs-method-POST>POST</a>
       <th> <a href=#attr-fs-method-put title=attr-fs-method-PUT>PUT</a>
       <th> <a href=#attr-fs-method-delete title=attr-fs-method-DELETE>DELETE</a>
-     <tr><th> <code title="">http</code>
+     <tbody><tr><th> <code title="">http</code>
       <td> <a href=#submit-mutate-action title=submit-mutate-action>Mutate action</a>
       <td> <a href=#submit-body title=submit-body>Submit as entity body</a>
       <td> <a href=#submit-body title=submit-body>Submit as entity body</a>

Modified: source
===================================================================
--- source	2009-08-17 03:03:55 UTC (rev 3644)
+++ source	2009-08-17 09:47:22 UTC (rev 3645)
@@ -40265,7 +40265,7 @@
 
   <p>The corresponding <span>attributes for form submission</span>
   that may be specified on <span title="concept-submit-button">submit
-  button</span> are <code
+  buttons</span> are <code
   title="attr-fs-formaction">formaction</code>, <code
   title="attr-fs-formenctype">formenctype</code>, <code
   title="attr-fs-formmethod">formmethod</code>, <code
@@ -40939,10 +40939,49 @@
 
   <p><i>This section is non-normative.</i></p>
 
-  <p class="XXX"> ... </p>
+  <p>When forms are submitted, the data in the form is converted into
+  the form specified by the <span
+  title="concept-fs-enctype">enctype</span>, and then sent to the
+  destination specified by the <span
+  title="concept-fs-action">action</span> using the given <span
+  title="concept-fs-method">method</span>.</p>
 
+  <p>For example, take the following form:</p>
 
+  <pre><form action="/find.cgi" method=get>
+ <input type=text name=t>
+ <input type=search name=q>
+ <input type=submit>
+</form></pre>
 
+  <p>If the user types in "cats" in the first field and "fur" in the
+  second, and then hits the submit button, then the user agent will
+  load <code title="">.../find.cgi?t=cats&q=fur</code>.</p>
+
+  <p>On the other hand, consider this form:</p>
+
+  <pre><form action="/find.cgi" method=post enctype="multipart/form-data">
+ <input type=text name=t>
+ <input type=search name=q>
+ <input type=submit>
+</form></pre>
+
+  <p>Given the same user input, the result on submission is quite
+  different: the user agent instead does an HTTP POST to the given
+  URL, with as the entity body something like the following text:</p>
+
+  <pre>------kYFrd4jNJEgCervE
+Content-Disposition: form-data; name="t"
+
+cats
+------kYFrd4jNJEgCervE
+Content-Disposition: form-data; name="q"
+
+fur
+------kYFrd4jNJEgCervE--</pre>
+
+
+
   <div class="impl">
 
   <h5>Implicit submission</h5>
@@ -41286,12 +41325,14 @@
     defined below the table.</p>
 
     <table>
+     <thead>
      <tr>
       <td>
       <th> <span title="attr-fs-method-GET">GET</span>
       <th> <span title="attr-fs-method-POST">POST</span>
       <th> <span title="attr-fs-method-PUT">PUT</span>
       <th> <span title="attr-fs-method-DELETE">DELETE</span>
+     <tbody>
      <tr>
       <th> <code title="">http</code>
       <td> <span title="submit-mutate-action">Mutate action</span>




More information about the Commit-Watchers mailing list