zendframework/zf2 — pull request #6298 by erispre (2014-05-20 14:24:58+00:00)
Title: Handle regular form elements as target elements of `Zend\Form\Element\Collection`.

The changes below allow for setting regular form elements (i.e. not a `Zend\Form\Fieldset`) as the target element of a form collection. Before this patch, this would create problems when binding a domain model. Now, a new input (`Zend\InputFilter\CollectionInput` -- basically a `ArrayInput` with some minor changes to message handling) is set for the collection when no input filter configuration is provided. This input will take the validators and filters of the target element and loop over an array of values. This way, domain models can be hydrated from form data. (Before this, there would be no inputs nor input filters attached to the `Collection`'s default input filter, so all values would be lost after `Form::isValid()` was called).

This pull request addresses issue #6263.