Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #9085: Modified some example form HTML to be XHTML, consistent …

…with Django default rendering. Thanks to Jarek Zgoda for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9034 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b8ba0154b8b22199f8e52f7033d3fdc3cd720474 1 parent 7617e73
Russell Keith-Magee authored September 15, 2008

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. 12  docs/topics/forms/index.txt
12  docs/topics/forms/index.txt
@@ -168,7 +168,7 @@ context variable ``form``. Here's a simple example template::
168 168
 
169 169
     <form action="/contact/" method="POST">
170 170
     {{ form.as_p }}
171  
-    <input type="submit" value="Submit">
  171
+    <input type="submit" value="Submit" />
172 172
     </form>
173 173
 
174 174
 The form only outputs its own fields; it is up to you to provide the surrounding
@@ -186,7 +186,7 @@ wrapped in a paragraph. Here's the output for our example template::
186 186
        <input type="text" name="sender" id="id_sender" /></p>
187 187
    <p><label for="id_cc_myself">Cc myself:</label>
188 188
        <input type="checkbox" name="cc_myself" id="id_cc_myself" /></p>
189  
-   <input type="submit" value="Submit">
  189
+   <input type="submit" value="Submit" />
190 190
    </form>
191 191
    
192 192
 Note that each form field has an ID attribute set to ``id_<field-name>``, which
@@ -226,7 +226,7 @@ above example::
226 226
             <label for="id_cc_myself">CC yourself?</label>
227 227
             {{ form.cc_myself }}
228 228
         </div>
229  
-        <p><input type="submit" value="Send message"></p>
  229
+        <p><input type="submit" value="Send message" /></p>
230 230
     </form>
231 231
 
232 232
 Each named form-field can be output to the template using
@@ -264,7 +264,7 @@ reduce duplicate code by looping through each field in turn using
264 264
                 {{ field.label_tag }}: {{ field }}
265 265
             </div>
266 266
         {% endfor %}
267  
-        <p><input type="submit" value="Send message"></p>
  267
+        <p><input type="submit" value="Send message" /></p>
268 268
     </form>
269 269
 
270 270
 Within this loop, ``{{ field }}`` is an instance of :class:`BoundField`.
@@ -299,7 +299,7 @@ can create a template that contains just the form loop and use the
299 299
 
300 300
     <form action="/contact/" method="POST">
301 301
         {% include "form_snippet.html" %}
302  
-        <p><input type="submit" value="Send message"></p>
  302
+        <p><input type="submit" value="Send message" /></p>
303 303
     </form>
304 304
     
305 305
     # In form_snippet.html:
@@ -318,7 +318,7 @@ context you can alias it using the :ttag:`with` tag::
318 318
         {% with comment_form as form %}
319 319
             {% include "form_snippet.html" %}
320 320
         {% endwith %}
321  
-        <p><input type="submit" value="Submit comment"></p>
  321
+        <p><input type="submit" value="Submit comment" /></p>
322 322
     </form>
323 323
 
324 324
 Further topics

0 notes on commit b8ba015

Please sign in to comment.
Something went wrong with that request. Please try again.