1HOUR_CHOICES = [('1', '8am'), ('2', '10am')]
2
3class TestForm(Form):
4 hour = SelectField(u'Hour', choices=HOUR_CHOICES)
1{% macro render_field(field) %}
2 <dt>{{ field.label }}
3 <dd>{{ field(**kwargs)|safe }}
4 {% if field.errors %}
5 <ul class=errors>
6 {% for error in field.errors %}
7 <li>{{ error }}</li>
8 {% endfor %}
9 </ul>
10 {% endif %}
11 </dd>
12{% endmacro %}
13