{% load static sekizai_tags i18n form_builder_tags cms_tags %}{% spaceless %}
    <div id="data{{ uid }}" class="form-div{% if form.bound %} was-validated{% endif %}">
        <div class="all-invalid alert alert-block alert-danger d-none">
            <ul class="m-0">
            </ul>
        </div>
        {% for plugin in instance.child_plugin_instances %}
            {% render_plugin plugin %}
        {% empty %}
            {% render_form form %}
        {% endfor %}
        {% if instance.child_plugin_instances %}
            {% render_recaptcha_widget form  %}
        {% endif %}
    </div>
{% endspaceless %}
{% addtoblock 'js' %}
<script
    data-error-msg="{% translate 'Network connection or server error. Please try again later. We apologize for the inconvenience.' %}"
    src="{% static 'djangocms_form_builder/js/ajax_form.js' %}"></script>
{% endaddtoblock %}

{% if instance.config.captcha_widget %}
    {% addtoblock 'js' %}<script src="https://www.google.com/recaptcha/api.js?onload=reCaptchaOnLoadCallback&render=explicit" async defer></script>{% endaddtoblock %}
{% endif %}
