Filament: Remove Label Text in Resource Form Page

A quick Filament tip for those who want to remove the label like "Create shop" or "Edit user" above the form.

You need to go to the Page file of the specific form, like CreateXXXXX.php or EditXXXXX.php and define the method getTitle() that would return an empty string.

app/Filament/Resources/ShopResource/Pages/CreateShop.php:

use Illuminate\Contracts\Support\Htmlable;
 
class CreateShop extends CreateRecord
{
// ...
 
public function getTitle(): string|Htmlable
{
return '';
}
}

The result afterwards:

Keep in mind that this will also remove the breadcrumbs above the label.

Also, notice that you need to override the method of getTitle() specifically. If you try to return an empty string from a $title property, it wouldn't give the same effect.


If you want more Filament examples, you can find more real-life projects on our FilamentExamples.com.

No comments or questions yet...

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