I'm not Zend_Form guru but I've been playing with it since the begging (incubator). There is something quite common that I didn't managed to make it with the current implementation.
Short description of the problem: How to inject pure (X)HTML code in any part of the form, without breaking the current Zend_Form workflow ? Long description: I want to display some blocks (DIV or P elements) in the middle of the form. These block are not related to any of the form elements. To create a decorator isn't a solution because the blocks will not decorate any element. To extend Zend_Form_Element_* is not a solution either because these blocks will not be filtered, validated, and in general don't met the properties of a Zend_Form_Element. For exemple I want to insert a preview block in the middle of the form which interacts with the elements but it's controlled via javascript code. This kind of blocks are valuable at the "display" state of the form and they are inexistent in the filtering, validation, "submit" stage. It's close to decorator but "not element related decorator". In Zend_Form as it is today, I can do this kind of layouts, but it's not "clean". What I do is attach the block to one of the form elements. This way the block is some kind logically dependent on one of the form elements, which is not true, it's a component/element of the form in general. Thanks for any suggestions, comments. Daniel -- View this message in context: http://www.nabble.com/Zend_From-inject-xhtml-in-the-form-tp16255932s16154p16255932.html Sent from the Zend Framework mailing list archive at Nabble.com.
