F
Filament5mo ago
cj

Update a widget from a resource's create form

I have a create form where I'm showing a table widget. This widget should update with potential "attached" models if the user chooses certain options from a select field. The widget is read only. The data is only there for users to validate their choices as they go through the creation process. Is it possible to pass field data of a create form to a footer widget? Right now, the create page for my resource returns the widget in getFooterWidgets(). I've tried updating the widget by using this on the form field in question
->afterStateUpdated(function ($livewire, Get $get) {
$livewire->dispatch('form-updated', $get('select_field_id'));
}),
->afterStateUpdated(function ($livewire, Get $get) {
$livewire->dispatch('form-updated', $get('select_field_id'));
}),
But I'm not sure how to get that information in to the table. Any advice would be appreciated.
0 Replies
No replies yetBe the first to reply to this messageJoin