I have a form contains name and pictures
MyForm:
name = TextField(
u'name',
validators=[
validators.DataRequired(),
validators.Length(min=1, max=25)
]
)
pictures = FileField(
u'pictures',
validators=[
FileRequired(),
FileAllowed(['jpg', 'png'], 'Images only!')
]
)
Jinja2 template:
{% from "_form_helpers.tpl" import render_field %}
<form method="post" action="" enctype="multipart/form-data">
<dl>
{{ render_field(form.name) }}
{{ render_field(form.pictures) }}
</dl>
<p>{{ form.submit }}
</form>
I want to upload one or more picture in a single field (Multi selection).
How to do this?
Thanks..