Hi,
In the beta releases of ZF2 there was a DisplayGroup for forms, but this
disappeared.
I think Collection is the successor of it, but I can't get it work....
If I add this to my form:
$collection = new Collection('university');
$collection->setLabel('University');
$this->add($collection);
$field = new Text('university_identification');
$field->setLabel('Identification')
->setRequired();
$collection->add($field);
$field = new Select('university_status');
$field->setLabel('Status')
->setRequired()
->setAttribute('options', University::$possibleStatuses);
$collection->add($field);
It is displayed like I want, but if I submit the form I get the following
error:
Fatal error: __clone method called on non-object in
/Users/krmarien/Sites/Litus/vendor/zendframework/zendframework/library/Zend/Form/Element/Collection.php
on line 514
How do I need to implement the collection?
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/ZF2-Form-Collections-tp4656577.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]