diff --git a/horilla_views/generic/cbv/views.py b/horilla_views/generic/cbv/views.py index 225ed2c75..5b7053c2d 100644 --- a/horilla_views/generic/cbv/views.py +++ b/horilla_views/generic/cbv/views.py @@ -1898,6 +1898,7 @@ class HorillaFormView(FormView): context["form_class_path"] = self.form_class_path context["view_id"] = self.view_id context["hx_confirm"] = self.hx_confirm + context["hx_target"] = self.request.META.get("HTTP_HX_TARGET", "this") pk = None if self.form.instance: pk = self.form.instance.pk diff --git a/horilla_views/templates/generic/horilla_form.html b/horilla_views/templates/generic/horilla_form.html index 1c921f97f..c39f9e47b 100644 --- a/horilla_views/templates/generic/horilla_form.html +++ b/horilla_views/templates/generic/horilla_form.html @@ -1,80 +1,74 @@ {% load generic_template_filters %} -