Use anonymous actions inside a modal form

EDIT: This actually works. The problem was caused by something else.

Hi all

Is there a way of using actions inside a modal form? I don't mean in the footer - I mean in the form body eg:

Actions::make([
    Action::make('myModalAction')
        ->label('Open')
        ->modal()
        ->modalHeading('Heading')
        ->modalDescription('Description')
        ->modalSubmitActionLabel('Confirm')
        ->form([
            TextInput::make('code')
                ->required()
                ->autofocus(),

            Actions::make([
                Action::make('resend')
                    ->label('Resend code')
                    ->link()
                    ->action(function () {
                        // do something
                    }),
            ]),
        ])
        ->action(function ($model) {
            // do something
        }),
]);


This isn't working for me. I'd really prefer to put a "Resend" link under the input instead of a button in the footer.
Was this page helpful?