How can you customize record title on attach action
Hello,
I would like to know if it's possible to customize record title more than just a different attribute. I would like to combine multiple attributes in to one title. Is it possible?
Thanks for any help in advance...
Solution:Jump to solution
GitHub
How can you customize record title on attach action · filamentphp f...
Package Table builder Package Version v3.2.83 How can we help you? Hello, I would like to know if it's possible to customize record title more than just a different attribute. I would like to c...
8 Replies
Assuming this is a relationship
->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->first_name} {$record->last_name}")
That's what I tried
It just resulted in lowercase name of model being the the opton title for every record
id is a string with nine chars and a start is an integer so this doesn't make sense to me
Solution
GitHub
How can you customize record title on attach action · filamentphp f...
Package Table builder Package Version v3.2.83 How can we help you? Hello, I would like to know if it's possible to customize record title more than just a different attribute. I would like to c...
Thank you so much, I didn't know I can do it like this.
Just spent a long time trying to get this to work before finally finding
AttachAction::make()->recordTitle()
. This needs to be added to https://filamentphp.com/docs/3.x/panels/resources/relation-managers#attaching-and-detaching-recordsThere’s a link at the bottom of the page. Feel free to submit a PR to update it.