Custom modal actions with multiple custom buttons

Hi,

I'm creating a modal that has two actions in the footer, replacing the default submit and cancel (see attached).

My logic looks something like the below:

 ->modalFooterActions([
    Action::make('approve')
        ->color('success')
        ->icon('heroicon-o-check')
        ->cancelParentActions()
        ->action(function (): void {

            dd('Here');
            $record->approve();

            Notification::make()
                ->success()
                ->title($record->full_name . ' has been approved');

        }),


The problem is I want to achieve this look and feel (modal UI with approve/reject buttons), but I can't gain access to the form data (to see whether
email
is checked) and it doesn't seem to be a simple process.

Does anyone have any ideas on how I can easily achieve this?

Thanks!
image.png
image.png
Was this page helpful?