F
Filament7mo ago
lmtc

Livewire Form inside modal but with a different resource

Hi there, I have been trying to work through this for a while now and can't seem to see anything in docs or discord. I have a pages resource, inside that form I have an action modal which I've called in a livewire view as per docs, but it's just rendering the same form from my pages resource again, instead of pulling in the one from my styling modal class. Is there a way to set the relationship in the extraItemActions? This is my action:
->modalContent(function (array $arguments, Repeater $component, StylingModal $styling): View {

$block_id = $component->getItemState($arguments['item']);
$styling_data = $styling->getStyling($block_id['block_id']);

return view('livewire.forms.pages.styling-modal', [
'block_id' => $block_id['block_id']
]);
})
->modalContent(function (array $arguments, Repeater $component, StylingModal $styling): View {

$block_id = $component->getItemState($arguments['item']);
$styling_data = $styling->getStyling($block_id['block_id']);

return view('livewire.forms.pages.styling-modal', [
'block_id' => $block_id['block_id']
]);
})
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server