{% load i18n %}
<form hx-post="{% url 'attendance-create' %}" hx-target="#addAttendanceModalBody" id="attendanceCreateForm"
    data-url = "{% url 'attendance-create' %}"
>
    {{form.as_p}}
</form>
<script>
    $(document).ready(function () {
        $("select").on("select2:select", function (e) {
            $(this).closest("select")[0].dispatchEvent(new Event("change"));
        });
    });
</script>
