ZF-2757: Zend_Form ordering not working correctly

Issue Type: Bug Created: 2008-02-28T14:06:46.000+0000 Last Updated: 2008-03-31T16:04:35.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: Matthew Weier O'Phinney (matthew) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Form

Related issues: - ZF-2754



Zend_Form ordering is not working correctly -- it's not picking up the element order when rendering.

Reproduce code:

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

$form->addElement('submit', 'submit')->submit->setLabel('Submit')->setOrder(30);
$form->addElement('text', 'name')->name->setLabel('Name')->setOrder(10);
$form->addElement('text', 'email')->email->setLabel('E-mail')->setOrder(20);
$form->setView(new Zend_View());

echo $form;

Expected order would be name, email, submit; actual order with 1.5.0RC1 is submit, name, email.

(Reported by Amr Mostafa on fw-mvc)


Posted by Matthew Weier O'Phinney (matthew) on 2008-03-07T08:16:50.000+0000

Created a test case with the reproduce code above and have confirmed this issue.

Posted by Matthew Weier O'Phinney (matthew) on 2008-03-07T09:11:48.000+0000

Fixed in trunk and 1.5 release branch.

Posted by Wil Sinclair (wil) on 2008-03-31T16:04:35.000+0000

Please evaluate and categorize as necessary.

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.