Is it possible to create and render and array of forms I know about collections but they don\'t really fit in my idea?
What I want is something like this
Create the forms in an array, but give each one a unique name.
I've changed it to formbuilder which might not be ideal for you but hopefully something similar will work. I'm also not certain about putting in new SomeType
rather than 'form', see http://api.symfony.com/2.4/Symfony/Component/Form/FormFactory.html#method_createNamedBuilder.
$data = $em->findAll();
for ($i = 0; $i < $n; $i++) {
$forms[] = $this->container
->get('form.factory')
->createNamedBuilder('form_'.$i, new SomeType, $data)
->getForm()
->createView();
}
return $this->render(someView, array("forms" => $forms));