make suggested changes for default value
This commit is contained in:
parent
c507b1db73
commit
fbd2a0ed9a
@ -25,8 +25,7 @@ class CollectionType extends AbstractType
|
||||
public function buildForm(FormBuilder $builder, array $options)
|
||||
{
|
||||
if ($options['allow_add'] && $options['prototype']) {
|
||||
$prototypeName = empty($options['prototype_name']) ? '$$name$$' : '$$' . $options['prototype_name'] . '$$';
|
||||
$prototype = $builder->create($prototypeName, $options['type'], $options['options']);
|
||||
$prototype = $builder->create('$$' . $options['prototype_name'] . '$$', $options['type'], $options['options']);
|
||||
$builder->setAttribute('prototype', $prototype->getForm());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user