{% if field.label %}
-
+
{% endif %}
- {% if style.inline %}
-
- {% for key, text in field.choices|items %}
-
- {% endfor %}
-
- {% else %}
+
{% for key, text in field.choices|items %}
-
-
+
+
+
{% endfor %}
- {% endif %}
- {% if field.errors %}
- {% for error in field.errors %}
- {{ error }}
- {% endfor %}
- {% endif %}
+ {% if field.errors %}
+ {# A fake input to trigger the error messages as it needs to be after a valid input #}
+ {# If it's with the last input and it's inline then the error stacks under the last input label #}
+ {# It has no name so no data will be sent #}
+
+ {% for error in field.errors %}
+ {{ error }}
+ {% endfor %}
+ {% endif %}
{% if field.help_text %}
- {{ field.help_text|safe }}
+ {{ field.help_text|safe }}
{% endif %}
+
\ No newline at end of file
diff --git a/rest_framework/templates/rest_framework/vertical/dict_field.html b/rest_framework/templates/rest_framework/vertical/dict_field.html
index a46759196..335b60c50 100644
--- a/rest_framework/templates/rest_framework/vertical/dict_field.html
+++ b/rest_framework/templates/rest_framework/vertical/dict_field.html
@@ -1,7 +1,7 @@
{% if field.label %}
-
+
{% endif %}
-
Dictionaries are not currently supported in HTML input.
+
Dictionaries are not currently supported in HTML input.