#Adding a button to the footer of the form

3 messages · Page 1 of 1 (latest)

wild pine
#

I'm Brazilian and I have a problem. I would like to add a button to the create side of the form, this button should open a modal (Custom modal with livewire). How do I do this? Figma example:

vast thistleBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

wise comet
# wild pine I'm Brazilian and I have a problem. I would like to add a button to the create s...

in the create page

public function getFormActions(): array
{
    return [
        ...parent::getFormActions(),
        Action::make('customAction')
            ->action(function () {
                //call your modal
            }),
    ];
}

if you are using https://filamentphp.com/docs/3.x/support/blade-components/modal
try

  `$this->dispatch('open-modal', id: 'modalId');

or

Action::make('customAction')
    ->dispatch('open-modal', ['id' => 'modalId'])