Relation manager many to many at resource create

Hi, I have working relation manager with attaching models/relations with editable pivot data but I'm curious if there is a way to allow attach/pre-attach or something at create page? I have delivery methods available in my app and user can create delivery prices where they can add name, select delivery methods and set their prices. It would be awesome to get this at create page instead of require save first with just a name and only then add delivery methods and prices.
5 Replies
morawcik
morawcik3mo ago
So I guess it's not possible for now.
Dennis Koch
Dennis Koch3mo ago
Sounds like you want a Repeater with a Relationship
morawcik
morawcik3mo ago
And just use a ->default() for Repeater?
Dennis Koch
Dennis Koch3mo ago
If you want a default why not. Didn't read that in your initial message
morawcik
morawcik2mo ago
Ok, thanks. I'll try it at home. Thanks again - it works like a charm. Each item has a few fields like name, is_enabled, price etc I added for each item a label (->itemLabel(fn (array $state): ?string => $state['name'] ?? null) but i'm curious if is possible to use a toggle for is_enabled in label (it would looks like "(toggle) name") and toggle it on/off would show/hide content (instead of default collapse function)
Want results from more Discord servers?
Add your server