© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
ahinkle

Set Global Form Input Label as `Str::headline()`?

In all of my inputs, I find myself overriding the label:

Billing first name -> Billing First Name

Is there way to override the default setting label to always use
Str::headline()
Str::headline()
? Either in a App Service Provider or service container?

TextInput::make('billing_first_name')
    ->label('Billing First Name')
TextInput::make('billing_first_name')
    ->label('Billing First Name')


Tried to do something fun like this but no dice:

TextInput::macro('label', function (string $label): static {
    return parent::label(Str::headline($label));
});
TextInput::macro('label', function (string $label): static {
    return parent::label(Str::headline($label));
});
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Set all column titles to headline()
FilamentFFilament / ❓┊help
3y ago
Label on global search
FilamentFFilament / ❓┊help
3y ago
Form Label Width
FilamentFFilament / ❓┊help
11mo ago
Input Blade Component Label
FilamentFFilament / ❓┊help
13mo ago