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.
How can it be hidden on the View Page?