Issues

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

Issue Type: Sub-task Created: 2009-11-02T07:37:11.000+0000 Last Updated: 2010-04-16T07:34:13.000+0000 Status: Resolved Fix version(s): Reporter: Dennis Becker (radhad) Assignee: Christian Albrecht (alab) Tags: - Zend_Form

Related issues: - ZF-9361

Attachments: - data.php

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

Posted by Dennis Becker (radhad) on 2009-11-02T07:37:40.000+0000

form & data for debugging

Posted by Andy Fowler (andyfowler) on 2009-12-14T14:45:18.000+0000

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?

Posted by Jamal Fanaian (jamal) on 2010-03-01T19:59:40.000+0000

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

<pre class="highlight">        
        if ($this->isArray()) {
            $defaults = $this->_dissolveArrayValue($defaults, $this->getElementsBelongTo());
        }

Posted by Christian Albrecht (alab) on 2010-03-18T08:25:40.000+0000

Fixed in [ZF-9361]

Posted by Christian Albrecht (alab) on 2010-03-25T13:24:00.000+0000

Will work on belongsTo after finishing elementsBelongTo.

Posted by Christian Albrecht (alab) on 2010-04-16T07:34:13.000+0000

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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts