© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
4 replies
Sjoerd24

Editing select label with pivot values

I have this form in a repeater form:
Forms\Components\Select::make('user_id')
    ->label(__('User'))
    ->relationship('user', 'name')
    ->live(onBlur: true)
    ->disabled(fn($record) => $record?->is_absent)
    ->distinct()
    ->disableOptionsWhenSelectedInSiblingRepeaterItems()
Forms\Components\Select::make('user_id')
    ->label(__('User'))
    ->relationship('user', 'name')
    ->live(onBlur: true)
    ->disabled(fn($record) => $record?->is_absent)
    ->distinct()
    ->disableOptionsWhenSelectedInSiblingRepeaterItems()

Now I am trying that the text "(absent)" appears after the username if is_absent ==true. I tried it with formatStateUsing and getOptionLabelFromRecordUsing(), but I just can't get it to work because i need the values from the relationship and the current (pivot) record. I am probably doing something stupid, but could someone point me in the right direction?
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

Wrong Pivot Values
FilamentFFilament / ❓┊help
15mo ago
From Select with pivot value
FilamentFFilament / ❓┊help
17mo ago
Form Select with Pivot Data
FilamentFFilament / ❓┊help
2y ago
Create select with pivot relationship
FilamentFFilament / ❓┊help
3y ago