Last active
September 11, 2023 20:20
-
-
Save hivre/3cb2213254ecf0dade5e to your computer and use it in GitHub Desktop.
WTForms Fieldlist vs FormField iteration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # FieldList | |
| {% for attachment in form.attachment %} | |
| {{ attachment(placeholder='Attachment', class="form-control") }} | |
| {{ form_error(form.errors.other) }} | |
| {% endfor %} | |
| # FormField | |
| {% for member in form.member %} | |
| {{ member.form.name(placeholder='name', class="form-control",required="required") }} | |
| {{ form_error(member.form.errors.name) }} | |
| {{ member.form.hidden_tag() }} | |
| {% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment