Change text for buttons "Create" and remove "Create and create another"
Hi everyone,
I was pretty sure to have found it the documentation a time ago, but I am not able to see it again.
I'm trying to change the label for the "Create" button (replace it with "Save") for Create and Edit pages, and I want to remove the "Create and create another" on the Create page. Can someone help me? Thanks a lot!
8 Replies
you need to publish translations :
php artisan vendor:publish --tag=filament-panels-translations
and go to /lang/vendor/filament-panels/en/resources/pages/create-record.php
Thanks @Strategic, I was able to change "Create" to "Save". However, I'm not able to completely remove the "Create & create another" button
I found
With $canCreateAnother
Thanks for your help! Everything's solved!
when you publish configuration you can change this file e /lang/vendor/filament-panels/en/resources/pages/create-record.php
'form' => [
'actions' => [
'cancel' => [
'label' => 'Cancel',
],
'create' => [
'label' => 'Save',
],
/* remove this 'create_another' => [
'label' => 'Save & add another',
],*/
],
],
I removed it, but the button was still here
No wories
Yes .. sorry i am tired.. its for labels it will not remove button ..
No issues, take time to rest a little! ;). Important to keep us in good health
Overwrite actions then
yes on the create resource page add this line
class CreateYourResourceName extends CreateRecord { protected static bool $canCreateAnother = false; }
class CreateYourResourceName extends CreateRecord { protected static bool $canCreateAnother = false; }