diff --git a/horilla_views/generic/cbv/views.py b/horilla_views/generic/cbv/views.py index c05713f67..d024317ba 100644 --- a/horilla_views/generic/cbv/views.py +++ b/horilla_views/generic/cbv/views.py @@ -1082,6 +1082,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") or "this" # 855 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..23d89a5b5 100644 --- a/horilla_views/templates/generic/horilla_form.html +++ b/horilla_views/templates/generic/horilla_form.html @@ -1,80 +1,76 @@ {% load generic_template_filters %} -
- {% for field_tuple in dynamic_create_fields %} - -
- {% endfor %} -
{{form.structured}}
- {% for field_tuple in dynamic_create_fields %} -
- - - {% endfor %} +
+ +
+ {{form.structured}} +
+ +{% for field_tuple in dynamic_create_fields %} +
+ + + + + + + +
+{% endfor %}