© 2026 Hedgehog Software, LLC

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

format options on relationship manager select in attach form

Is there a way to set the format on options for the select when attaching on a relationship manager?

I basically would like to concatenate first_name and last_name in the options, but cant figure out how. I can do it on regular selects using
getOptionLabelFromRecordUsing
getOptionLabelFromRecordUsing
but it does not seem to work on the Attach action select.

Here is what I'm doing:

 AttachAction::make()
->form(fn (AttachAction $action): array => [
    $action
    ->getRecordSelect()
    ->getOptionLabelFromRecordUsing(fn(Model $record) => "{$record->first_name} {$record->last_name}"
 AttachAction::make()
->form(fn (AttachAction $action): array => [
    $action
    ->getRecordSelect()
    ->getOptionLabelFromRecordUsing(fn(Model $record) => "{$record->first_name} {$record->last_name}"
Solution
Something to try Accessor as a column in the Attach action on a RelationManager
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

get select record on relation manager attach form
FilamentFFilament / ❓┊help
3y ago
Select field ->preload() not working in relationship manager attach action
FilamentFFilament / ❓┊help
3y ago
Attach in relationship manager is Timing out
FilamentFFilament / ❓┊help
3y ago
Using formatStateUsing on Select relationship
FilamentFFilament / ❓┊help
2y ago