ZF-8204: Zend_Form::populate() does not work with textarea & "belongsTo" in element defintion

Description

I try to populate() saved data by the same form to edit the values, but the value for the textarea does not appear. You can check this with the files I'll add as attachement.

Comments

form & data for debugging

I believe that I'm seeing this same issue in 1.9.6. Elements that have belongsTo() cannot be populate()'d with an array. Zend_Form::setDefaults() makes it look like this is the desired behavior?

This can be fixed by adding the following to the beginning of Zend_Form::setDefaults (or extending it).

        
        if ($this->isArray()) {
            $defaults = $this->_dissolveArrayValue($defaults, $this->getElementsBelongTo());
        }

Fixed in [ZF-9361]

Will work on belongsTo after finishing elementsBelongTo.

Duplicates now parent ZF-9607 which has a Patch and Unit Test attached.