© 2026 Hedgehog Software, LLC

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

Error in documentation or code ( Select->allowHtml( ) )

I wanted to make use of the allowHtml() method in a Select box that I have made on one of my resource forms, but even when copying the documentation exactly I have been unable to get any HTML to display at all. I haven't made any custom css or edited any of the styling throughout the rest of the application.

When I go to the inspector I can see the HTML is being applied but the styling is being overwritten by something, and from my investigation so far looks like its being overwritten by:
public/css/filament/forms/forms.css
public/css/filament/forms/forms.css

I'm hoping this is something that either I have done wrong or have overlooked in some regard, but it all seems to be correct. Here is the Select box that I was trying to make:
Select::make('status')
 ->label('Status')
 ->options([
  'submitted' => '<span class="text-blue-500">Submitted</span>',
  'accepted' => '<span class="text-green-500">Accepted</span>',
  'rejected' => '<span class="text-red-500">Rejected</span>',
 ])
 ->allowHtml()
Select::make('status')
 ->label('Status')
 ->options([
  'submitted' => '<span class="text-blue-500">Submitted</span>',
  'accepted' => '<span class="text-green-500">Accepted</span>',
  'rejected' => '<span class="text-red-500">Rejected</span>',
 ])
 ->allowHtml()

I did also try adding the searchable() method to it as well like in the docs in case it was restricted to just searchable objects, but that hasn't helped either.
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

Select value when using allowHtml
FilamentFFilament / ❓┊help
3y ago
Select field allowHtml does not render <img> tags.
FilamentFFilament / ❓┊help
2y ago
MorphToSelect with allowHtml
FilamentFFilament / ❓┊help
3y ago
Select Or Create
FilamentFFilament / ❓┊help
3y ago