Using Step Form with Livewire

I am using Step Form on Action to Build 3 Step Form. I am using Livewire table in Step. In the Table every row has checkbox to select rows. I need help On final Submit How do I get back the rows value which are checked? Any idea? My Resource File.
Step::make('Select Channels')
->schema([
Forms\Components\View::make('livewire-channel-table')
]),

Step::make('Select Videos')
->schema([
Forms\Components\View::make('livewire-video-table')
->viewData(['campaignId' => $record->id])
]),
Step::make('Select Channels')
->schema([
Forms\Components\View::make('livewire-channel-table')
]),

Step::make('Select Videos')
->schema([
Forms\Components\View::make('livewire-video-table')
->viewData(['campaignId' => $record->id])
]),
Livewire Blade file
<tbody class="bg-white divide-y divide-gray-200">
@foreach($channels as $channel)
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<input type="checkbox" wire:model="checkedItems.{{ $channel->id }}" wire:change="handleCheckboxChange($event.target.value)" name="selectedRows[]" value="{{ $channel->id }}">
</td>
<td class="px-6 py-4 whitespace-nowrap">
{{ $channel->name }}
</td>
<tbody class="bg-white divide-y divide-gray-200">
@foreach($channels as $channel)
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<input type="checkbox" wire:model="checkedItems.{{ $channel->id }}" wire:change="handleCheckboxChange($event.target.value)" name="selectedRows[]" value="{{ $channel->id }}">
</td>
<td class="px-6 py-4 whitespace-nowrap">
{{ $channel->name }}
</td>
No description
No description
1 Reply
toeknee
toeknee3mo ago
I'm not sure you can tbh, with a table it's completely out of scope. My only thought is to store the table values in the session on a bulkaction event and on submit, get the stored values? Or maybe you can get the table selected records for each element in the form?
Want results from more Discord servers?
Add your server