Require confirmation modal on submit action

I want to add a confirmation popup on create form submit button.
6 Replies
LeandroFerreira
This works in v3, not sure about v2, but you can use the same approach
protected function getCreateFormAction(): Action
{
return parent::getCreateFormAction()
->submit(null)
->requiresConfirmation()
->action(function (Action $action) {
$this->closeActionModal();
$this->create();
});
}
protected function getCreateFormAction(): Action
{
return parent::getCreateFormAction()
->submit(null)
->requiresConfirmation()
->action(function (Action $action) {
$this->closeActionModal();
$this->create();
});
}
Pooja
Pooja4w ago
Not working in v2
Umar Farooq
Umar Farooq4w ago
how add confirmation modal inside the relation manager? confirmation modal the modal submit the form
->headerActions([
Tables\Actions\CreateAction::make()
->createAnother(false)
->label(__('request-builder.post_request.action_label'))
])
->headerActions([
Tables\Actions\CreateAction::make()
->createAnother(false)
->label(__('request-builder.post_request.action_label'))
])
LeandroFerreira
hum I don't know in v2
Pooja
Pooja4w ago
I want apply in v2