Change button label on create page
Hi,
Is it possible to change the label of the button on the create page in the form? Without using Blade components.
The "Create" and "Create & Add Another" labels.
Thx in advance! π
2 Replies
these buttons specifically
in the models resource create page (CreateModelName.php), you can overwrite the getFormActions, and add the label to the returned actions:
protected function getFormActions(): array
{
return [
$this->getCreateFormAction()->label('customCreateButton'),
...(static::canCreateAnother() ? [$this->getCreateAnotherFormAction()->label('customCreateAnotherButton')] : []),
$this->getCancelFormAction()->label('customCancelButton'),
];
}