Display Relationshipvalue in View-Form on Resource-Modal
Hi - Since Discord decides to bug out on the search-function and scrolling the result and I can't find it anywhere, could someone please point me in the right direction?
I got a Resource and wanna do a quick view-action, so I build up the
form()
-method like this:
The fields on the record itself work fine, but the RelationShip-Fields on "myrelation" are empty. I found how to fix that on selects, but not on TextInputs. How can I fill those fields with their respected values? (I don't think that I have a typo on the notions.)5 Replies
is worker a data set or a string?
both worker and jobkey are strings
Solution
->formatStateUsing(fn($record) => $record->myrelation->worker)
?
Thanks - I thought it was something easy. Just didn't find it! π
Ahh no problem! I still get confused sometimes. I even had to refer to the docs just then for a mount action using method I was missing π