New Button Underneath Form

Hi everyone, can I add new button here (please see screenshot). I want to add another button to move to review page. Thanks
No description
4 Replies
JibayMcs
JibayMcs3mo ago
Hi ! @putudian2013 Here the solution, you need to apply theses on both (or not) EditPurchaseRequest and CreatePurchaseRequest pages of your PurchaseResource
use Filament\Actions\Action;

class EditPurchaseRequest extends EditRecord {

[...]

protected function getFormActions(): array
{
return [
...parent::getFormActions(), // Call the original "Save" and "Cancel" actions, but you can remove theses
Action::make('putudian2013')
->label('putudian2013') // Your additionnal action
];
}

}
use Filament\Actions\Action;

class EditPurchaseRequest extends EditRecord {

[...]

protected function getFormActions(): array
{
return [
...parent::getFormActions(), // Call the original "Save" and "Cancel" actions, but you can remove theses
Action::make('putudian2013')
->label('putudian2013') // Your additionnal action
];
}

}
And voilà !
No description
JibayMcs
JibayMcs3mo ago
Btw, you can change the order of your actions by moving the calls order:
protected function getFormActions(): array
{
return [
Action::make('putudian2013')
->label('putudian2013'),
...parent::getFormActions(),
];
}
protected function getFormActions(): array
{
return [
Action::make('putudian2013')
->label('putudian2013'),
...parent::getFormActions(),
];
}
No description
putudian2013
putudian2013OP3mo ago
wow amazing. thanks a lot @JibayMcs
Want results from more Discord servers?
Add your server