|
@@ -27,7 +27,8 @@ class CollectionType extends AbstractType
|
|
|
{
|
|
|
if ($options['allow_add'] && $options['prototype']) {
|
|
|
$prototype = $builder->create('$$name$$', $options['type'], $options['options']);
|
|
|
- $builder->setAttribute('prototype', $prototype);
|
|
|
+ $builder->setAttribute('prototype', $prototype->getForm());
|
|
|
+ $builder->add($prototype);
|
|
|
}
|
|
|
|
|
|
$dataClass = isset($options['options']['data_class']) ? $options['options']['data_class'] : null;
|
|
@@ -63,7 +64,7 @@ class CollectionType extends AbstractType
|
|
|
;
|
|
|
|
|
|
if ($form->hasAttribute('prototype')) {
|
|
|
- $view->set('prototype', $form->getAttribute('prototype'));
|
|
|
+ $view->set('prototype', $form->getAttribute('prototype')->createView($view));
|
|
|
}
|
|
|
}
|
|
|
|