ZF-2757: Zend_Form ordering not working correctly
Description
Zend_Form ordering is not working correctly -- it's not picking up the element order when rendering.
Reproduce code:
$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)
Comments
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.