1.12.0 Release broke radio buttons, check boxes
See original GitHub issue- Package version: 1.12.0
- Django version: 3.2.4
- Python version: 3.8.5
- Template pack: Bootstrap 4
Description: Upgrading to 1.12.0 broke all radio buttons and checkboxes on a previously working site. I have confirmed that the 1.12.0 release is where the bug was introduced by stepping back to 1.11 and then updating to 1.11.2 with all still working at 1.11.2. Looking at the HTML, it looks like the problem is that there are no IDs on the <input>
s and only a for
with no =some_id
on the <label>
corresponding to the <input>
.
Following are screenshots of one of the fields on the rendered form, the HTML, and the Crispy Forms Python code:
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Radio buttons and checkboxes are broken in Microsoft Forms
Radio buttons and checkboxes are broken in Microsoft Forms ... forms are filled out, entries into checkbox or radio button fields are lost....
Read more >Changelog - Streamlit Docs
This allows caching checkboxes, sliders, radio buttons, and more! Other Changes. Design tweak to prevent jittering in sliders (#5612). Bug...
Read more >Checkboxes vs. Radio Buttons vs. Select Lists - Formstack
A common mistake we often see people making on their forms is the use of checkboxes instead of radio buttons.
Read more >How to Create Custom Checkboxes and Radio Buttons
For removing the default checkbox style, you need to set the CSS visibility property with its "hidden" value. Or use the opacity property...
Read more >How to Create Custom Radio Buttons and Checkboxes
All browsers provide a default look for the radio button and checkbox input elements. If you add a multiple choice or multiple response...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi all 👋
So it seems that we’ve found the source of the issue and crispy-forms continues to behave as documented even if there was a bug in previous versions that meant a different behaviour could also be achieved.
On that basis I’m going to close this as I don’t think there’s anything else we should do here. Maybe we can document better but happy to take feedback on this point. 🙏
(I wonder if folk will find this with a Web search now in any case).
Thanks again for all of your input and feedback. 🎁
FYI for others who come here, this comment has another workaround:
So if you set your widget to forms.RadioSelect, it’ll work.