ZF-12348: Dynamicly add elements with belongsTo

Issue Type: Bug Created: 2012-07-26T10:01:15.000+0000 Last Updated: 2013-01-22T10:10:34.000+0000 Status: Open Fix version(s): Reporter: Vladimir Kalchenko (vladimir.kalchenko) Assignee: Frank Brückner (frosch) Tags: - Zend_Form

  • zf-crteam-needsexpert
  • zf-crteam-review

Related issues: Attachments: - Element.FileTest.php.patch


Trying to dynamicly add elements to form

<pre class="highlight">
$form  = new Application_Form_Foo();

$form->addElement('text', 'foo', array(
    'belongsTo' => 'params',

$form->addElement('file', 'bar', array(
    'belongsTo' => 'params',

and render form in view script:

<pre class="highlight">
echo $this->form;

In HTML text element has correct name -

<pre class="highlight">
But file element has incorrect name - 


Posted by Frank Brückner (frosch) on 2012-07-27T11:10:22.000+0000

Patch and unit tests added.

Posted by Frank Brückner (frosch) on 2012-07-30T15:41:22.000+0000

Another patch added.

Posted by Frank Brückner (frosch) on 2012-07-31T08:41:01.000+0000

This issue is still in progress. More tests needed!

Posted by Frank Brückner (frosch) on 2012-11-09T11:21:18.000+0000

This issue needs a review from CR-Team, because I think all changes ends in a BC break.

Have you found an issue?

See the Overview section for more details.


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

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