I found an answer here but it's not an answer per se but I comment.
Quoting Crast:
The description
keyword argument of WTForms fields is allowed to be set at field construction, and is not inspected, just copied directly onto the field, and thus can be any value, not just a string, even a custom attribute. If you want to carry over your own metadata, you can simply use this to carry over any data you may want: TextField(..., description={'placeholder': foo', 'class': bar}
(or even a custom class) then use this attribute in your template for any special metadata you want.
Yes, I know about separating content and presentation and the purpose of the description
property isn't really intended for this kind of use, but it's the only way I found to pass data back to the template where I use a macro to render forms.
To access the passed data inside description
from the template I did something like this:
{% macro render_create_form(form, form_title, enctype=None) %}
<h2>{{ form_title }}</h2>
<form action="" method="post"{% if enctype %} enctype="{{ enctype }}"{% endif %}>
{{ form.hidden_tag() }}
{% for field in form if not field.name == 'csrf_token' %}
{% set class_name = field.description.class %}
{% if field.type == "StringField" or field.type == "PasswordField" or field.type == "BooleanField" or field.type == "SelectField" %}
<div class="{{ class_name }}">{{ field.label }} {{ field }}</div>
{% elif field.type == "NumberField" %}
<div class="{{ class_name }}">{{ field.label }} {{ field(type='number', min=field.description.min, max=field.description.max, placeholder=field.description.placeholder) }}</div>
{% elif field.type == "HiddenField" %}
{{ field }}
{% elif field.type == "SubmitField" %}
<div class="{{ class_name }}">{{ field }}</div>
{% endif %}
{% endfor %}
</form>
{% endmacro %}