diff --git a/docs/patterns/wtforms.rst b/docs/patterns/wtforms.rst index 0d6a313e..262d364f 100644 --- a/docs/patterns/wtforms.rst +++ b/docs/patterns/wtforms.rst @@ -73,14 +73,12 @@ Here an example `_formhelpers.html` template with such a macro: {% macro render_field(field) %}
{{ field.label }}
{{ field(**kwargs)|safe }} - {% if field.errors %} - - {% endif %} -
+ {% if field.errors %} + + {% endif %} + {% endmacro %} This macro accepts a couple of keyword arguments that are forwarded to