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.
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1142917905558802533/image.png)
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1142917906049544322/image.png)
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1142917906427019325/image.png)
2 Replies
Probably the code from the built-in Repeater field is the best place to explore.
yes that's what I end up doing