Author: julien
Date: 2011-09-13 01:22:53 -0700 (Tue, 13 Sep 2011)
New Revision: 16823
Modified:
django/trunk/docs/topics/forms/index.txt
Log:
Fixed #16815 -- Rectified the code example for hidden_fields and visible_fields
in the forms documentation. Thanks, joonas.
Modified: django/trunk/docs/topics/forms/index.txt
===================================================================
--- django/trunk/docs/topics/forms/index.txt 2011-09-13 03:10:07 UTC (rev
16822)
+++ django/trunk/docs/topics/forms/index.txt 2011-09-13 08:22:53 UTC (rev
16823)
@@ -333,16 +333,13 @@
these two methods::
<form action="/contact/" method="post">
+ {# Include the hidden fields #}
+ {% for hidden in form.hidden_fields %}
+ {{ hidden }}
+ {% endfor %}
+ {# Include the visible fields #}
{% for field in form.visible_fields %}
<div class="fieldWrapper">
-
- {# Include the hidden fields in the form #}
- {% if forloop.first %}
- {% for hidden in form.hidden_fields %}
- {{ hidden }}
- {% endfor %}
- {% endif %}
-
{{ field.errors }}
{{ field.label_tag }}: {{ field }}
</div>
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.