Just curious, if you aren’t using live wire, why did you choose to use fluxui components? Why not just use standard html inputs and blade?
Mar 27, 2025
2
Level 5
FluxUI Radio Button Won't Pass Value to Normal Laravel Form?
I'm going crazy here. I can't get a FluxUI Radio button to pass its value to my form. I'm not using Livewire for it, though if I absolutely have to, I will. I'm not opposed to it, just like doing things the normal Laravel way for most things if I can.
<!-- Transform Data -->
<flux:field x-show="fileFormat === 'csv'">
<flux:radio.group name="transform_data"
x-model="transformData"
id="transform_data"
label="Transform Data"
>
<flux:radio value="yes" label="Yes" checked/>
<flux:radio value="no" label="No"/>
</flux:radio.group>
</flux:field>
I have this radio group and radios following the Flux UI docs for this component. I've passed a name, but whenever I try to dd the value, it's always false.
public function exportStore(Request $request)
{
// Get the authenticated user
$user = auth()->user();
// Validate the request
$request->validate([
'file_format' => 'required|in:json,csv',
'places_filter' => 'required|in:all,recent,custom',
'selected_places' => 'array|required_if:places_filter,custom',
'transform_data' => 'boolean'
]);
// FIXME: This isn't being passed correctly as a boolean value. "Yes" passes false
$doTransformData = $request->boolean('transform_data');
dd($doTransformData);
Am I just missing something or doing something wrong?
Please or to participate in this conversation.