Creating Usable Forms With Zend Framework

Chris Hartjes writes a very nice article about how to make (re)usable zend_forms; After searching around online for some examples of building simple forms, I was dismayed to discover there were two different ways of building the form. I could (a) do it the long way and create specific instances of the form elements using Zend_Form_Element_X or (b) do it the short way and add them to the form by use of Zend_Form::addElement() and pass it the type of form element I want via an array. For reasons I cannot explain initially, I decided to do things the long way. Later on, I found out that doing it this way saved me from rewriting.
Via: Creating Usable Forms With Zend Framework.

Leave a Reply

Your email address will not be published. Required fields are marked *