Passing check boxes value data to controller from modal

I have a resource with a button which opens a modal with custom view and multiple checkboxes. Now when I press a button on modal, I want to submit / pass checkboxes values to controller, but I can't seem to get it to work. I tried wrapping my view into form, tried alpine.js, tried pure javascript and creating custom livewire component, but nothing works. Any ideas or tutorials, because I can't seem to find one for this specific case? I'm not even sure what the best thing to use here would be and would like some help clearing things up. I get my data array, but I don't get any checkbox values, been stuck on this for a while now with no success.
No description
No description
No description
No description
2 Replies
lukaveck1
lukaveck1OP2w ago
Okay I think I found solution after all somehow 2 min after writting this up. Basically return custom view, but then also return livewire component inside that view which will render livewire component view :):
No description
No description
No description
No description
toeknee
toeknee2w ago
Filament\Forms\Components\Livewire::make(pdfTemplate::class, ['date' => $record->data]),
Filament\Forms\Components\Livewire::make(pdfTemplate::class, ['date' => $record->data]),

Did you find this page helpful?