diff --git a/crispy_bootstrap5/templates/bootstrap5/layout/multifield.html b/crispy_bootstrap5/templates/bootstrap5/layout/multifield.html index 0a2c050..3d4f76d 100644 --- a/crispy_bootstrap5/templates/bootstrap5/layout/multifield.html +++ b/crispy_bootstrap5/templates/bootstrap5/layout/multifield.html @@ -1,27 +1,3 @@ -{% load crispy_forms_field %} - -{% if field.is_hidden %} - {{ field }} -{% else %} - - {% if field.label %} - - {% endif %} - -{% endif %} +
+ {{ fields_output }} +
diff --git a/crispy_bootstrap5/templates/bootstrap5/multifield.html b/crispy_bootstrap5/templates/bootstrap5/multifield.html new file mode 100644 index 0000000..f0a001a --- /dev/null +++ b/crispy_bootstrap5/templates/bootstrap5/multifield.html @@ -0,0 +1,5 @@ +{% load crispy_forms_field %} + +
+ {% include 'bootstrap5/field.html' %} +
diff --git a/tests/test_layout_objects.py b/tests/test_layout_objects.py index 1ca8a12..6d82313 100644 --- a/tests/test_layout_objects.py +++ b/tests/test_layout_objects.py @@ -20,7 +20,7 @@ TabHolder, ) from crispy_forms.helper import FormHelper -from crispy_forms.layout import HTML, Field, Layout, MultiWidgetField +from crispy_forms.layout import HTML, Field, Layout, MultiField, MultiWidgetField from crispy_forms.utils import render_crispy_form from django import forms from django.template import Context, Template @@ -542,6 +542,18 @@ def test_hidden_fields(self): assert html.count('type="hidden"') == 5 assert html.count("