F
Filament2y ago
Sesh

Customize / translate CreateAction modal title

I am using the create action (see https://filamentphp.com/docs/3.x/actions/prebuilt-actions/create#overview) as a ->headerAction() in a v3 standalone Table Builder. How can I customize / translate the title of the CreateAction modal (see screenshot). I couldn't find it in the doc or by searching here. I tried to add the string "comment" to the language file which didn't work. Also it does not use the label attribute of the CreateAction (which would be the easiest way to customize and translate).
Solution:
Aaah its: ->modalHeading(fn () => __('translation-key'))
Jump to solution
6 Replies
awcodes
awcodes2y ago
->modalHeader(fn () => __('translation-key'))
Sesh
SeshOP2y ago
Thanks. I am getting this error: Method Filament\Tables\Actions\CreateAction::modalHeader does not exist.
Solution
Sesh
Sesh2y ago
Aaah its: ->modalHeading(fn () => __('translation-key'))
awcodes
awcodes2y ago
yep, was just about to respond. sorry.
Sesh
SeshOP2y ago
Thanks @awcodes
awcodes
awcodes2y ago
np

Did you find this page helpful?