{% macro render_field(field) %} {% if field.type == 'BooleanField' %} {{ render_boolean_field(field, *args, **kwargs) }} {% elif field.type == 'SubmitField' %} {{ render_submit_field(field, *args, **kwargs) }} {% elif field.type in ['FileField', 'MultipleFileField'] %} {{ render_file_field(field, *args, **kwargs) }} {% elif field.type in ['IntegerField', 'PasswordField', 'SelectField', 'StringField'] %} {{ render_generic_field(field, *args, **kwargs) }} {% endif %} {% endmacro %} {% macro render_boolean_field(field) %}