{% load django_bootstrap5 coderedcms_tags wagtailcore_tags %}
{% with page=self.page.specific %}
{% if page.form_live %}
{% get_pageform page request as form %}
<form class="{{ page.form_css_class }}" id="{{ page.get_form_id }}" action="{% pageurl page %}" method="POST"
  {% if form|is_file_form %}enctype="multipart/form-data" {% endif %}>
  {% csrf_token %}
  {% bootstrap_form form layout="horizontal" %}
  <div class="mt-5 row">
    <div class="{{'horizontal_label_class'|bootstrap_settings}}"></div>
    <div class="{{'horizontal_field_class'|bootstrap_settings}}">
      {% include "coderedcms/includes/form_button.html" %}
    </div>
  </div>
</form>
{% endif %}
{% endwith %}
