Matthimatiker / MolComponents

Library with use-at-will architecture that extends the functionality of Zend Framework 1. Main features: Improved bootstrapping with lazy loading of resources, declaration of request parameters as argument in controller actions, advanced form creation and validation, mail templates, lightweight controller testing.
Other
2 stars 0 forks source link

Form plugin: Captcha insertion at wrong position #65

Closed Matthimatiker closed 11 years ago

Matthimatiker commented 11 years ago

The captcha element that is injected by the plugin should be inserted before the last button.

If order values are assigned to the elements this does not seem to work properly in all cases. It seems as if getElementsAndSubFormsOrdered() does not return the elements sorted by their order value (as one could expect), which causes this behavior.

Matthimatiker commented 11 years ago

It is important to use the form as iterator instead of getElementsAndSubFormsOrdered().

Additionally, the elements had to be cleared and re-added to ensure that the new order values are applied.