F
Filament6d ago
Xavi

Sidebar action modal

Does anyone know if it is possible to add a button on the sidebar to open a modal for the contact form?
Solution:
Hi ! Something like this can help you ? ```php ->renderHook(PanelsRenderHook::SIDEBAR_NAV_START, fn() => Blade::render('<x-filament::button wire:click="$dispatch('open-modal', { id: 'contact-form-modal' })">Test</x-filament::button>')...
Jump to solution
4 Replies
Solution
JibayMcs
JibayMcs6d ago
Hi ! Something like this can help you ?
->renderHook(PanelsRenderHook::SIDEBAR_NAV_START, fn() =>
Blade::render('<x-filament::button wire:click="$dispatch(\'open-modal\', { id: \'contact-form-modal\' })">Test</x-filament::button>')
);
->renderHook(PanelsRenderHook::SIDEBAR_NAV_START, fn() =>
Blade::render('<x-filament::button wire:click="$dispatch(\'open-modal\', { id: \'contact-form-modal\' })">Test</x-filament::button>')
);
JibayMcs
JibayMcs6d ago
(or directly a livewire component handling your form+modal)
JibayMcs
JibayMcs6d ago
No description
Xavi
Xavi6d ago
it works, thanks @JibayMcs !
Want results from more Discord servers?
Add your server