Ticket #9085: formsdoc.diff

File formsdoc.diff, 1.5 KB (added by Jarek Zgoda, 16 years ago)

Fix XHTML markup.

  • docs/topics/forms/index.txt

     
    168168
    169169    <form action="/contact/" method="POST">
    170170    {{ form.as_p }}
    171     <input type="submit" value="Submit">
     171    <input type="submit" value="Submit" />
    172172    </form>
    173173
    174174The form only outputs its own fields; it is up to you to provide the surrounding
     
    186186       <input type="text" name="sender" id="id_sender" /></p>
    187187   <p><label for="id_cc_myself">Cc myself:</label>
    188188       <input type="checkbox" name="cc_myself" id="id_cc_myself" /></p>
    189    <input type="submit" value="Submit">
     189   <input type="submit" value="Submit" />
    190190   </form>
    191191   
    192192Note that each form field has an ID attribute set to ``id_<field-name>``, which
     
    226226            <label for="id_cc_myself">CC yourself?</label>
    227227            {{ form.cc_myself }}
    228228        </div>
    229         <p><input type="submit" value="Send message"></p>
     229        <p><input type="submit" value="Send message" /></p>
    230230    </form>
    231231
    232232Each named form-field can be output to the template using
     
    264264                {{ field.label_tag }}: {{ field }}
    265265            </div>
    266266        {% endfor %}
    267         <p><input type="submit" value="Send message"></p>
     267        <p><input type="submit" value="Send message" /></p>
    268268    </form>
    269269
    270270Within this loop, ``{{ field }}`` is an instance of :class:`BoundField`.
Back to Top