Add validation attributes to select fields

This commit is contained in:
Alice Gaudon 2020-04-25 09:38:25 +02:00
parent 162063025c
commit 8332c439ad
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@
{% endfor %} {% endfor %}
</div> </div>
{% elseif type == 'select' %} {% elseif type == 'select' %}
<select name="{{ name }}" id="field-{{ name }}"> <select name="{{ name }}" id="field-{{ name }}" {{ validation_attributes|safe }}>
{% for option in extraData %} {% for option in extraData %}
<option value="{{ option }}" {{ 'selected' if value == option }}>{{ option }}</option> <option value="{{ option }}" {{ 'selected' if value == option }}>{{ option }}</option>
{% endfor %} {% endfor %}