Skip to content

Commit

Permalink
fix #128: Boolean field shows label twice
Browse files Browse the repository at this point in the history
  • Loading branch information
jrief committed Apr 5, 2024
1 parent 4578201 commit 19e410c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion formset/renderers/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _amend_label(self, context, hide_checkbox_label=False):
if hide_checkbox_label and widget_type == 'checkbox':
# `<label>Label:</label>` is rendered by `{{ field }}`, so remove it to
# prevent double rendering.

context.pop('label', None)
context['attrs'].pop('for', None)
context['use_tag'] = bool(self.control_css_classes)
if widget_type == 'button' and 'label' in context:
Expand Down

0 comments on commit 19e410c

Please sign in to comment.