-
I need to style To provide some context, this is required in the omnipresent Bootstrap CSS. I am thinking of piggybacking onto WTForm's |
Beta Was this translation helpful? Give feedback.
Answered by
savchenko
Jul 8, 2024
Replies: 1 comment
-
Solved! {% macro render_field_with_errors(field) %}
<div class="{{ kwargs.pop('divclass', '') }}" id="{{ field.id|default('fs-field') }}">
{{ field(**kwargs)|safe }} {{ field.label }}
{% if field.errors %}
<ul>
{% for error in field.errors %}<li class="fs-error-msg">{{ error }}</li>{% endfor %}
</ul>
{% endif %}
</div>
{% endmacro %} Than you can do something like: {{ render_field_with_errors(login_user_form.email, class="myclass", divclass="mydivclass", placeholder="[email protected]") }} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
savchenko
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solved!
Than you can do something like: