<div class="{{ form_class }}">
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">{{ form_title }}</h3>
        </div>
        <div class="card-body">
            <form method="POST">
                {% csrf_token %}
                {% for field in form %}
                <div class="row{% if field.errors %} has-error{% endif %}">
                    <div class="col-lg-4">{{ field.label_tag }}</div>
                    <div class="col-lg-8">
                        {{ field }}
                        {% if field.help_text %}
                        <span class="badge bg-secondary mb-2">{{ field.help_text|safe }}</span>
                        {% endif %}
                        {{ field.errors }}
                    </div>
                </div>
                {% endfor %}
                <div class="row">
                    <div class="col-lg-4"><input name="op" type="submit" value="{{ form_submit }}" class="btn btn-primary"/></div>
                </div>
            </form>
        </div>
    </div>
</div>