Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radio buttons in a form not rendered properly when adding new siblings #91

Open
carlogravador opened this issue Oct 10, 2023 · 1 comment
Labels
question Further information is requested

Comments

@carlogravador
Copy link

I'm having issues rendering radio buttons if I create a new sibling.

Example of radio button without selection yet:
image

After I added a new sibling

Rendered radio button after creating new sibling
image

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
...
@jrief jrief added the bug Something isn't working label Oct 12, 2023
jrief added a commit that referenced this issue Oct 12, 2023
My attempt to reproduce #91.
All radio buttons however are rendered as expected.
@jrief
Copy link
Owner

jrief commented Oct 12, 2023

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

@jrief jrief added question Further information is requested and removed bug Something isn't working labels Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants