[Bug] Radio buttons do not work correctly
See original GitHub issueBug report
What I did
'name' => 'some_boolean_var',
'type' => 'radio',
'options' => [
0 => 'Something...',
1 => 'Something else...',
],
'inline' => true,
'label' => 'Some label',
'tab' => 'Some tab',
What I expected to happen
What happened
What I’ve already tried to fix it
'default' => 0,
Backpack, Laravel, PHP, DB version
- Backpack 4.1
- Laravel 7+
- PHP 7.4
- PostgreSQL 12+
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (12 by maintainers)
Top Results From Across the Web
Radio button is not working properly
In my web page I have placed some radio buttons. But these buttons are not working properly. I can check multiple buttons.
Read more >BUG - Radio button does not show any selection whe...
When I select another person, the radio buttons show the correct value only if the underlying value is also changed. If person 2's...
Read more >17602 - Arrow keys should change radio buttons, not Tab
Press the right arrow key Result: Nothing happens - Press the Tab key Result: You advance to the next radio button This is...
Read more >states doesn't work correctly with radio buttons [#767268]
It seems that #states with radios doesn't work quite right. It works when the page is loaded, but doesn't change when the radio...
Read more >80681 – Button.setSelection() does not deselects other ... - Bugs
This is the correct behavior although it might be unwanted by many applications. Radio behavior is only enforced when selection is done by...
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
Wow that’s interesting, thanks for pitching in @lucidlive .
@NikitaMakovey - any chance you had this attribute casted as
boolean
inside your Model?Just another scenario I just encountered… If you have any script to reset the
value
of the forminput
, it will clear the value of theradio
options too! meaning that all your options havenull
invalue
, so the hidden field will always benull
too! double-check yourvalue
of all options of the radio input.