© 2026 Hedgehog Software, LLC

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

Form Select relationship search in two columns

I have the following code:

Forms\Components\Select::make('person_id')
->relationship('person', 'lastname')
->getOptionLabelFromRecordUsing(fn (Person $record) => $record->getFullname())
->searchable()
->label('Lastname')
->required(),

but i also want to search for firstname in my person table, how can i do this?
Solution
https://filamentphp.com/docs/3.x/forms/fields/select#searching-relationship-options-across-multiple-columns
Select - Form Builder - Filament
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

Form Select - Search Across Relationship
FilamentFFilament / ❓┊help
2y ago
Form Select relationship with custom search
FilamentFFilament / ❓┊help
11mo ago
Two columns form
FilamentFFilament / ❓┊help
3y ago
Relationship search in belongsTo select
FilamentFFilament / ❓┊help
3y ago