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