© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•8mo ago•
3 replies
Mike

Enums for datalist attribute values

Hello Filament community,

I am really liking the use of enums in Filament. I wanted to ask if I can use them in datalist attributes in the form builder too? And if so, what would be best practices at the moment?

Thank you.
Solution
What about

->datalist(fn() => collect(Status::cases())->mapWithKeys(fn ($case) => [$case->value => $case->label()])) 
->datalist(fn() => collect(Status::cases())->mapWithKeys(fn ($case) => [$case->value => $case->label()])) 


with Status class being the enum?
Jump to solution
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

Listing multiple values for a relationship with another attribute
FilamentFFilament / ❓┊help
3y ago
Select Filter for Enums
FilamentFFilament / ❓┊help
2y ago
fillForm for CheckboxList Enums
FilamentFFilament / ❓┊help
3y ago
Attribute
FilamentFFilament / ❓┊help
3y ago