django-formset
django-formset copied to clipboard
Radio buttons in a form not rendered properly when adding new siblings
I'm having issues rendering radio buttons if I create a new sibling.
Example of radio button without selection yet:
After I added a new sibling
Rendered radio button after creating new sibling
here's a snippet of the form and form collection
# BaseModelForm inherits forms.ModelForm
class MyForm(BaseModelForm):
...
is_retired = forms.ChoiceField(required=False,
widget=forms.RadioSelect, label='Is retired?',
choices=RadioButtonChoices.choices)
...
# BaseFormCollection inherits formset.collection.FormCollection
class MyFormCollection(BaseFormCollection):
...
my_form = MyForm()
min_siblings = 1
...
just attempted to reproduce this bug but in my case all radio buttons are rendered correctly.
Please check out https://github.com/jrief/django-formset/tree/reproduce-issue-91 and rebuild the project.
Then run the example on http://localhost:8000/bootstrap/contact