diff --git a/crispy_bootstrap5/templates/bootstrap5/layout/radio_checkbox_select.html b/crispy_bootstrap5/templates/bootstrap5/layout/radio_checkbox_select.html index 18f361f..7170397 100644 --- a/crispy_bootstrap5/templates/bootstrap5/layout/radio_checkbox_select.html +++ b/crispy_bootstrap5/templates/bootstrap5/layout/radio_checkbox_select.html @@ -17,11 +17,11 @@ {% endfor %} {% endfor %} - {% if field.errors and inline_class %} - {% for error in field.errors %} -

{{ error }}

- {% endfor %} - {% endif %} - {% include 'bootstrap5/layout/help_text.html' %} +{% if field.errors and inline_class %} + {% for error in field.errors %} +

{{ error }}

+ {% endfor %} +{% endif %} +{% include 'bootstrap5/layout/help_text.html' %} diff --git a/tests/forms.py b/tests/forms.py index 2cf8aad..f84f24a 100644 --- a/tests/forms.py +++ b/tests/forms.py @@ -281,7 +281,9 @@ class GroupedChoiceForm(forms.Form): ("unknown", "Unknown"), ] checkbox_select_multiple = forms.MultipleChoiceField( - widget=forms.CheckboxSelectMultiple, choices=choices + widget=forms.CheckboxSelectMultiple, + choices=choices, + help_text="help", ) radio = forms.MultipleChoiceField(widget=forms.RadioSelect, choices=choices) diff --git a/tests/results/test_grouped_checkboxes.html b/tests/results/test_grouped_checkboxes.html index 23da516..90ac40f 100644 --- a/tests/results/test_grouped_checkboxes.html +++ b/tests/results/test_grouped_checkboxes.html @@ -18,5 +18,8 @@ name="checkbox_select_multiple" type="checkbox" value="unknown"> +
+ help +
- \ No newline at end of file + diff --git a/tests/results/test_grouped_checkboxes_failing.html b/tests/results/test_grouped_checkboxes_failing.html index bfd6828..6ed7662 100644 --- a/tests/results/test_grouped_checkboxes_failing.html +++ b/tests/results/test_grouped_checkboxes_failing.html @@ -21,5 +21,8 @@ required.

+
+ help +
- \ No newline at end of file +