In Flask 0.8, I know I can access individual form fields using form.fieldname.data, but is there a simple way of iterating over all the form fields? I\'m building a
form.fieldname.data
The form object has an iterator defined on it:
{% for field in form %} {% if field.type == "BooleanField" %} {{ field }} {{ field.label }} {% else %} {{ field.label }} {{ field }} {% endif %} {% endfor %}
This is from https://wtforms.readthedocs.io/en/2.3.x/fields/#wtforms.fields.Field.type