Files
fastapi-admin/fastapi_admin/templates/widgets/inputs/select.html
2021-05-06 21:42:39 +08:00

19 lines
623 B
HTML

{% with id = 'form-select-' + name %}
<div class="form-group mb-3">
<div class="form-label">{{ label }}</div>
<select class="form-select" name="{{ name }}" id="{{ id }}">
{% for option in options %}
<option value="{{ option[1] }}" {% if option[1] == value %}
selected
{% endif %} >{{ option[0] }}</option>
{% endfor %}
</select>
</div>
{% include "components/select.html" %}
{% if help_text %}
<small class="form-hint">
{{ help_text }}
</small>
{% endif %}
{% endwith %}