Select option formatting

Good morning filament fans! Is there a way to have a select using a relationship to display 2 columns ? I.e. product code and name? E.g. "WD-001 Wooden blocks"
Solution:
Sorry I did write a reply. I would personally recommend using a virtual column if using MySQL as: https://laraveldaily.com/post/virtual-db-columns-laravel-migrations-mysql Otherwise, you can use getOptionLabelUsing(fn($record) => $record->values)...
Jump to solution
5 Replies
toeknee
toeknee5d ago
Yes
delboy1978uk
delboy1978ukOP5d ago
@toeknee thanks, i'm looking but i cant seem to find in the docs what it is that i need to do, i am guessing the title attribute is the display value?
Solution
toeknee
toeknee5d ago
Sorry I did write a reply. I would personally recommend using a virtual column if using MySQL as: https://laraveldaily.com/post/virtual-db-columns-laravel-migrations-mysql Otherwise, you can use getOptionLabelUsing(fn($record) => $record->values)
delboy1978uk
delboy1978ukOP5d ago
ah that's brilliant! thank you so much!
toeknee
toeknee5d ago
Welcomes 🙂

Did you find this page helpful?