F
Filament17mo ago
Med

How to create a custom form field for a hasMany relationship?

I want to create a custom form field for a hasMany relationship, Could anyone guide me on how to achieve this? Any tips, code examples, or documentation references would be greatly appreciated, Currently, I have the getVariants method to generate a variants list from the product options, I want to render multiple inputs from that array, and data will be saved as variants that belong to the product.
2 Replies
Patrick Boivin
Patrick Boivin17mo ago
Probably the code from the built-in Repeater field is the best place to explore.
Med
MedOP17mo ago
yes that's what I end up doing

Did you find this page helpful?