© 2026 Hedgehog Software, LLC

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

How to get the select option label using $get?

Select::make('category')->relationship('category', 'name')->reactive(),
TextInput::make('slug')->prefix(fn ($get) => $get('category').'/')
Select::make('category')->relationship('category', 'name')->reactive(),
TextInput::make('slug')->prefix(fn ($get) => $get('category').'/')

From the code above, the slug prefix returns the 'id' of the category, of course....
But how to get the label instead of the value?
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

How the get the option label from a select
FilamentFFilament / ❓┊help
2y ago
How to dynamically populate select option label using the Form Builder
FilamentFFilament / ❓┊help
3y ago
Modifying the option label in Select
FilamentFFilament / ❓┊help
3y ago
How to update option label using suffixaction?
FilamentFFilament / ❓┊help
7d ago