{% extends "base.html" %} {% block content %}
{% for model_field in view_model.fields -%}
{{ model_field.field_name | replace(from="_id", to="") | split(pat="_") | join(sep=" ") | title }}{% if not model_field.is_option %} *{% endif %}
{% if model_field.field_type == "SelectList" %} {% include "create_or_edit/selectlist.html" %} {% elif model_field.field_type == "Checkbox" %} {% include "create_or_edit/checkbox.html" %} {% else %} {% include "create_or_edit/input.html" %} {% endif %}
{% if model.errors | get(key=model_field.field_name, default="" ) !="" %}

{{ model.errors | get(key=model_field.field_name) }}

{% endif %} {% if model.custom_errors | get(key=model_field.field_name, default="" ) !="" %}

{{ model.custom_errors | get(key=model_field.field_name) }}

{% endif %}
{%- endfor %}
{% endblock content %}