[Form] Add new fields in CollectionField::setData()

This commit is contained in:
Jeremy Mikola 2010-09-10 12:09:52 -04:00 committed by Fabien Potencier
parent 57c0ce0ec1
commit 77602239a4

View File

@ -61,6 +61,10 @@ class CollectionField extends FieldGroup
}
}
foreach ($collection as $name => $value) {
$this->add($this->newField($name, $name));
}
parent::setData($collection);
}