ParkinsonDetection / app /templates /_formhelpers.html
Genos77's picture
first commit
e9ee222
raw
history blame contribute delete
797 Bytes
{% macro render_input_field(field) %}
<div class="mb-3">
{{ field.label(class="form-label") }} {# This renders the basic field with
validation styling #} {{ field(class="form-control" + (" is-invalid" if
field.errors else "")) }} {% if field.errors %}
<div class="invalid-feedback">
{% for error in field.errors %}
<span>{{ error }}</span>
{% endfor %}
</div>
{% endif %}
</div>
{% endmacro %} {% macro render_textarea_field(field, rows=3) %}
<div class="mb-3">
{{ field.label(class="form-label") }} {{ field(class="form-control" + ("
is-invalid" if field.errors else ""), rows=rows) }} {% if field.errors %}
<div class="invalid-feedback">
{% for error in field.errors %}
<span>{{ error }}</span>
{% endfor %}
</div>
{% endif %}
</div>
{% endmacro %}