Filament: Change Field Labels in Register/Login Form

If you want to override the label(s) of fields in the register form, follow the steps below. The same logic applies for customizations of the login form.

Step 1. Create a class extending the Filament\Pages\Auth\Register.

app/Filament/Pages/Register.php

namespace App\Filament\Pages;
 
use Filament\Pages\Auth\Register as BaseRegister;
 
class Register extends BaseRegister
{
// Any customizations will go here
}

Step 2. Specify that class in the PanelProvider.

app/Providers/Filament/AdminPanelProvider.php

use App\Filament\Pages\Register;
 
// ...
 
public function panel(Panel $panel): Panel
->id('admin')
->path('admin')
->login()
->registration(Register::class)

Step 3. Override methods like getNameFormComponent(), getPasswordFormComponent(), etc.

app/Filament/Pages/Register.php

class Register extends BaseRegister
{
protected function getNameFormComponent(): Component
{
return TextInput::make('name')
->label('Full name')
->required()
->maxLength(255)
->autofocus();
}
}

For the list of available methods to override, check the Filament source code.

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 59 courses (1057 lessons, total 42 h 44 min)
  • 79 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord

Recent Premium Tutorials