How to populate a Radio field with the existing response

Is there a way to add the relationship() to a Radio field as you can do with a Select field, so the response is automatically populated when editing the field? I'm able to populate the options using Model::all()->pluck('label', 'id'), but the existing response isn't selected when editing the entry.
2 Replies
Patrick Boivin
Patrick Boivin16mo ago
Have you tried wrapping the Radio in a Group?
Group::make([
Radio::make('my_radio')
// ...
])->relationship('my_relationship'),
Group::make([
Radio::make('my_radio')
// ...
])->relationship('my_relationship'),
richeklein
richekleinOP16mo ago
Just tried ... and it doesn't work. I can just change it to a select field to get it working for now.
Want results from more Discord servers?
Add your server