123456789101112131415161718 |
- <div class="form-group">
- <label for="{{ field_id }}">
- {{ label }}
- </label>
- <select class="form-control {% if error %}is-invalid{% endif %}" id="{{ field_id }}" name="{{ field_name }}">
- <option></option>
- {% for choice_value, choice_text in field.choices %}
- <option value="{{ choice_value }}" {% if value == choice_value %}selected{% endif %}>{{ choice_text }}</option>
- {% endfor %}
- </select>
- {% if error %}
- <small class="invalid-feedback">{{ error }}</small>
- {% elif field.description %}
- <small class="form-text text-muted">{{ field.description }}</small>
- {% endif %}
- </div>
|