question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Radio buttons do not work correctly

See original GitHub issue

Bug 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

image

What happened

image

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:closed
  • Created 3 years ago
  • Comments:20 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
tabacitucommented, Jul 16, 2020

Wow that’s interesting, thanks for pitching in @lucidlive .

@NikitaMakovey - any chance you had this attribute casted as boolean inside your Model?

0reactions
kiddtangcommented, May 23, 2022

Just another scenario I just encountered… If you have any script to reset the value of the form input, it will clear the value of the radio options too! meaning that all your options have null in value, so the hidden field will always be null too! double-check your value of all options of the radio input.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found