Secondary Modal Submit Action with RequiresConfirmation

Im trying to add another submit action on a modal that requires a confirmation. Tried adding that, but cant seem to get access to the original actions form. Any suggestions? I tried also using makeSubmitAction too, but it doesnt allow you to add a requiresConfirmation or much else to it.
->modalFooterActions(function (Action $action) {
    return [
        $this->terminationRequiresReview() ? $this->submitTerminationForReviewAction($action) : $action->getModalSubmitAction(),
        $action->getModalCancelAction(),
    ];
})

$this->submitTerminationForReviewAction(Action $parentAction): Action
{
    return Action
        ->label('Submit for Review')
        ->requiresConfirmation()
        ->modalWidth(MaxWidth::ExtraLarge)
        ->modalHeading('Submit for Review')
        ->modalDescription('Are you sure you are ready to submit this action?')
        ->infolist([
            ShoutEntry::make('review-alert')
                ->content('Once reviewed you will be notified of the results of the review and provided with instructions for next steps.'),
        ])
        ->action(function (Action $action) {
            // need access to form data and it should be validated first like the normal submit action
            $this->saveFormData();
            $action->cancelParentActions();
        });
}
Solution
try
->modalFooterActions([
  Action::make('save_confirm')
    ->label('aubmit for review')
    ->requiresConfirmation()
    ->action('save')
    ->keyBindings(['mod+s'])
])
Was this page helpful?