F
Filament16mo 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
awcodes16mo ago
->modalHeader(fn () => __('translation-key'))
Sesh
SeshOP16mo ago
Thanks. I am getting this error: Method Filament\Tables\Actions\CreateAction::modalHeader does not exist.
Solution
Sesh
Sesh16mo ago
Aaah its: ->modalHeading(fn () => __('translation-key'))
awcodes
awcodes16mo ago
yep, was just about to respond. sorry.
Sesh
SeshOP16mo ago
Thanks @awcodes
awcodes
awcodes16mo ago
np
Want results from more Discord servers?
Add your server