Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ctrlaltdelme's avatar

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?

0 likes
2 replies
jdc1898's avatar

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?

1 like
ctrlaltdelme's avatar

@jdc1898 Just keeping things as minimal as possible and using Livewire where necessary. I could probably make these two routes that use the radio buttons Livewire Full Page Components and just move the Blade to those files and it'll work. I just want to know if there is a way to get it to work not using Livewire. I know Flux is a Livewire library, but it should still work, no?

Please or to participate in this conversation.