summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/forms/index.txt13
1 files changed, 5 insertions, 8 deletions
diff --git a/docs/topics/forms/index.txt b/docs/topics/forms/index.txt
index 234417bf00..5b6f87fbec 100644
--- a/docs/topics/forms/index.txt
+++ b/docs/topics/forms/index.txt
@@ -333,16 +333,13 @@ and visible fields independently: ``hidden_fields()`` and
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>