#Add requiresConfirmation to save or create action with validation

3 messages · Page 1 of 1 (latest)

gloomy lionBOT
#

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

true cargo
#
protected function getCreateFormAction(): Action
{
    return parent::getCreateFormAction()
        ->requiresConfirmation()
        ->submit(null)
        ->mountUsing(fn () => $this->form->getState())
        ->action(fn () => $this->create());
}
#

Could you share the code that you are using in the resource?