ZF-9791: Access to Zend_Form object from any Zend_Form_Element or Zend_Form_Decorator
Description
Hello,
It would be nice to be able to access to the current Zend_Form object from any Zend_Form_Element or Zend_Form_Decorator (a getForm method...) I'm made some change into Zend_Form_Decorator_Description class to handle variables in a "sprintf style". Unfortunately I can get only the current element value and can't access to all form context :( ...
Comments
Posted by Christian Albrecht (alab) on 2010-05-03T08:32:56.000+0000
Sébastian, thought about implementing this too, because of the Notation handling when rendering names, i thought about setting the member $_form when attaching an element or form to a existing form, *but* there is a drawback - s/o will try setting the $_form member on an already attached element which then requires many actions to be proxied - resetting belongsTo, assurance that the name is not token within the new parent form, removing the element and all settings from the previous form, and so on ... I mean there is much to take care about, so that i am not willing at the moment to implement this, and i have something cooking, at that... ZF-9516 (be warned it is chaotic)