@nosean and in your component, is the default value for $form['isCompany'] = 'yes';?
Otherwise that state will change when you switch between the radio buttons, the default checked from HTML won't initialize your component with the value.
The advice of {{ $form['isCompany'] }} is spot on and crucial in troubleshooting and understand Livewire radio button issues.
I came back to this post after struggling for days to get this perfect on the Laravel Livewire Jetstream Profile update screen. In my scenario I had both a dropdown select, and a checkbox. Both needed conditional show and hide functionality.
After hours of struggling I can tell you the rules are:
Don't use checked on radio buttons as Livewire will take care of everything.
Be sure to bind all your radio buttons to the same model.
If you're usings booleans in your database, native storage are 0s and 1s. Make sure value="0" and value="1" otherwise Livewire won't set them properly when loading.
When updating your database, do this:
'has_partner' => $input['has_partner'] == '1' ? true : false,
Change events on both select and checkboxes would need to refresh the page. In my case I just call an empty refresh() method on the component but I'm sure there is a better way.
The only solution come out from my mind right now is Did your question array comes in key pair? If so ``` foreach($question as $key => $q) https://shagle.download { $this->validate https://omegle.ws ([ 'question.'.$key => ['required'] ]); }
@Snapey that's a bit unfair mate. What in the future someone else needs a solution. I think it is better that is late in the party but at least it is answered rather than left aside.