Ticket #16815: 16815-looping_hidden_fields_docs.patch
File 16815-looping_hidden_fields_docs.patch, 892 bytes (added by , 13 years ago) |
---|
-
docs/topics/forms/index.txt
333 333 these two methods:: 334 334 335 335 <form action="/contact/" method="post"> 336 {# Include the hidden fields in the form #} 337 {% for hidden in form.hidden_fields %} 338 {{ hidden }} 339 {% endfor %} 336 340 {% for field in form.visible_fields %} 337 341 <div class="fieldWrapper"> 338 339 {# Include the hidden fields in the form #}340 {% if forloop.first %}341 {% for hidden in form.hidden_fields %}342 {{ hidden }}343 {% endfor %}344 {% endif %}345 346 342 {{ field.errors }} 347 343 {{ field.label_tag }}: {{ field }} 348 344 </div>