Dynamic Repeater Field

I have dynamic fields in a form. I generate the form by looping through the data like :

foreach (product as product) {
  $formSchema[] = Forms\Components\Section::make($productname);
  return $formSchema;
}

complete source: https://gist.github.com/TegarAditya/1313a8e2067062ce25f7e0cf729f5a6e
In that schema I want to add a repeater field. So each Product will have its own repeater to add variety. I've tried adding repeaters but it didn't work. Instead, an browser console error appears when I press the add action button. So how to do that properly.

Thank you,
image.png
image.png
Gist
GitHub Gist: instantly share code, notes, and snippets.
Was this page helpful?