Ticket #9085: formsdoc.diff
File formsdoc.diff, 1.5 KB (added by , 16 years ago) |
---|
-
docs/topics/forms/index.txt
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 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 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 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`.