© 2026 Hedgehog Software, LLC

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

Label on form field, custom view

Im trying to use my own view for the label of a select form field.

public function label(string | Htmlable | Closure | null $label): static
    {
        $this->label = $label;

        return $this;
    }
public function label(string | Htmlable | Closure | null $label): static
    {
        $this->label = $label;

        return $this;
    }

Label accepts Htmlable and Closure, so i'm thinking this should be possible.
But when i use:
Select::make('type')
        ->label(fn() => view('forms.components.label-with-tooltip'))
Select::make('type')
        ->label(fn() => view('forms.components.label-with-tooltip'))

It just escapes the HTML and prints the output.

Is this possible? and how?
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

Working form field on ViewRecord?
FilamentFFilament / ❓┊help
2y ago
Infolist Custom ViewEntry added form field validation.
FilamentFFilament / ❓┊help
2y ago
Custom form field
FilamentFFilament / ❓┊help
2y ago
Custom Form Field
FilamentFFilament / ❓┊help
2y ago