<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Zendcasts Forum / Is Zend_Form maintainable?]]></title>
		<link>http://www.zendcasts.com/forum/viewtopic.php?id=46</link>
		<description><![CDATA[The most recent posts in Is Zend_Form maintainable?.]]></description>
		<lastBuildDate>Mon, 18 Jan 2010 21:29:56 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Is Zend_Form maintainable?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=559#p559</link>
			<description><![CDATA[<p>There is a new Zend Webinar about Zend_Form</p><p><a href="http://www.zend.com/en/webinar/Framework/webinar-leveraging-zend_form-decorators-20091216.flv">http://www.zend.com/en/webinar/Framewor … 091216.flv</a></p>]]></description>
			<author><![CDATA[dummy@example.com (jsuggs)]]></author>
			<pubDate>Mon, 18 Jan 2010 21:29:56 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=559#p559</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is Zend_Form maintainable?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=364#p364</link>
			<description><![CDATA[<p>Glad to see that I&#039;m not the only person that has found it difficult to get their head around form decorators.&#160; My current approach is to use view helper scripts to position the individual form elements in the page.&#160; &#160;Using a form helper then allows me to use the same script if using the form to create/add initial data or to update existing data.</p><p>starting in the controller, I will instantiate a form object and assign it to a view variable.<br />[code=php]<br />public function addexptAction()<br />{<br />&#160; &#160; $this-&gt;view-&gt;title = &#039;Add Experiment&#039;;<br />&#160; &#160; &#160; &#160; <br />&#160; &#160; &#160; &#160; $form = new Expt_Form_DetailsForm;<br />&#160; &#160; &#160; &#160; $form-&gt;setAction( $this-&gt;getUrlThisAction() );<br />&#160; &#160; &#160; &#160; $this-&gt;view-&gt;form = $form; // var_dump($form);die;<br />[/code]<br />I set the value of the form action inside the controller, all other form attributes are pretty standard so I set them inside the form class, which I will show later.</p><p>An example view script&#160; (addexperiment.phtml) might look something like this...<br />[code=php]<br />&lt;div class=&quot;prepend-8 span-10 append-6 prepend-top content last&quot; id=&quot;Title_container&quot;&gt;<br />&lt;h2&gt;&lt;?php echo $this-&gt;title ?&gt;&lt;/h2&gt;<br />&lt;/div&gt;<br />&lt;?php&#160; echo $this-&gt;ExptDetails01( $this-&gt;form ); ?&gt;<br />[/code]</p><p>above you can see that I am passing the form object into the view helper script (ExptDetails01.php)</p><p>This next piece of code is the view helper<br />[[code=php]<br />&lt;?php</p><p>class Expt_View_Helper_ExptDetails01 extends Zend_View_Helper_Abstract<br />{<br />&#160; &#160; /**<br />&#160; &#160;&#160; * Description: accepts form object of type Expt_Form_DetailsForm and returns form html text<br />&#160; &#160;&#160; * @param $form<br />&#160; &#160;&#160; * @return text <br />&#160; &#160;&#160; */<br />&#160; &#160; public function ExptDetails01( Expt_Form_DetailsForm $form )<br />&#160; &#160; {<br />&#160; &#160; &#160; &#160; <br />$content=&lt;&lt;&lt;_HTML_<br />&lt;!-- START: Form Element --&gt;</p><p>&lt;form name=&quot;{$form-&gt;getAttrib(&#039;name&#039;)}&quot;<br />&#160; &#160; &#160;class=&quot;{$form-&gt;getAttrib(&#039;class&#039;)}&quot;<br />&#160; &#160; &#160; &#160; id=&quot;{$form-&gt;getAttrib(&#039;id&#039;)}&quot;<br />&#160; &#160;enctype=&quot;{$form-&gt;getAttrib(&#039;enctype&#039;)}&quot;<br />&#160; &#160; action=&quot;{$form-&gt;getAttrib(&#039;action&#039;)}&quot;<br />&#160; &#160; method=&quot;{$form-&gt;getAttrib(&#039;method&#039;)}&quot; &gt;<br />&#160; &#160; <br />&lt;div class=&quot;span-24 maincontent-1 last&quot; id=&quot;form_container&quot;&gt;<br />&#160; &#160;&lt;div class=&quot;prepend-1 span-10 last&quot;&gt;&amp;nbsp;{$form-&gt;getElement(&quot;expt_number&quot;)-&gt;getLabel()} : {$form-&gt;getElement(&quot;expt_number&quot;)}&lt;/div&gt;<br />&lt;/div&gt;&#160; &lt;!-- end div: form_container --&gt;</p><p>&lt;div class=&quot;span-24 maincontent-1 last&quot; id=&quot;form_container&quot;&gt;<br />&#160; &#160;&lt;div class=&quot;prepend-1 span-10 last&quot;&gt;&amp;nbsp;{$form-&gt;getElement(&quot;diet&quot;)-&gt;getLabel()} : {$form-&gt;getElement(&quot;diet&quot;)}&lt;/div&gt;<br />&lt;/div&gt;&#160; &lt;!-- end div: form_container --&gt;<br />_HTML_;</p><p>if ($form-&gt;getElement(&quot;id&quot;)) {<br />&#160; &#160; $content.=&lt;&lt;&lt;_HTML_<br />{$form-&gt;getElement(&quot;id&quot;)}<br />_HTML_;<br />}</p><p>$content.=&lt;&lt;&lt;_HTML_<br />&lt;div class=&quot;span-24 maincontent-1 last&quot; id=&quot;form_container&quot;&gt;<br />&#160; &#160;&lt;div class=&quot;prepend-1 span-7 last&quot;&gt;{$form-&gt;getElement(&quot;submit&quot;)}&lt;/div&gt;<br />&lt;/div&gt;&#160; &lt;!-- end div: form_container --&gt;</p><p>&lt;/form&gt;&lt;!-- end form --&gt;<br />_HTML_;<br />&#160; &#160; &#160; &#160; return $content;<br />&#160; &#160; }</p><p>} // end class.<br />[/code]</p><p>The allowed form class that is acceptable by this function is restricted to a single type, Expt_Form_DetailsForm, in this example.</p><p>If the form is used to insert initial data, the id is a serial which is automatically assigned by the database.&#160; If I want to use the same form/view helper as an update form I must pass in an id element which is not in the form class but is something that I add at the controller.</p><p>for example in the controller I might have something like ... <br />[code=php]<br />// add hidden id element to form so that id number association is kept.<br />$form-&gt;addElement( $id = new Zend_Form_Element_Hidden(&#039;id&#039;) );<br />$id-&gt;setValue((int)$arrMouse[&#039;id&#039;]);<br />[/code]</p><br /><p>Now the form class for this example.&#160; There are only three elements, a textbox, select box, and a submit button. <br />[code=php]<br />&lt;?php</p><p>class Expt_Form_DetailsForm extends My_Zend_Form<br />{<br />&#160; &#160; <br />&#160; &#160; protected $detailsService;<br />&#160; &#160; protected $_refTableDiet;<br />&#160; &#160; <br />&#160; &#160; public function __construct( $options = null )<br />&#160; &#160; {<br />&#160; &#160; &#160; &#160; parent::__construct($options);</p><p>&#160; &#160; &#160; &#160; $this-&gt;detailsService = new Expt_Service_DetailsService;<br />&#160; &#160; &#160; &#160; $this-&gt;_refTableDiet = new Expt_Model_RefTableDietModel; // var_dump($this-&gt;_refTableDiet);die;<br />&#160; &#160; &#160; &#160; <br />&#160; &#160; &#160; &#160; $this-&gt;setName(&#039;mouse_form&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;-&gt;setDescription(&#039;This is the Experiment Details Form&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;//-&gt;setAction()&#160; // set in controller-Action<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;-&gt;setAttrib(&#039;enctype&#039;, &#039;application/x-www-form-urlencoded&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;-&gt;setAttrib(&#039;method&#039;, &#039;post&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;-&gt;setAttrib(&#039;id&#039;, &#039;expt_details_form&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;-&gt;setAttrib(&#039;class&#039;, &#039;appform&#039;);</p><p>&#160; &#160; &#160; &#160; $formFeName =&#160; &#039;expt_number&#039;;<br />&#160; &#160; &#160; &#160; //======================================<br />&#160; &#160; &#160; &#160; $this-&gt;addElement( ${$formFeName} = new Zend_Form_Element_Text(&quot;$formFeName&quot;));<br />&#160; &#160; &#160; &#160; ${$formFeName}-&gt;setRequired(true)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;setLabel(&#039;Eperiment Number&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; //-&gt;setValue(&#039;&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; //-&gt;setDescription(&#039;Hr.&#039;)&#160; &#160; &#160; &#160; <br />&#160; &#160; &#160; &#160; <br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;setAttrib( &#039;size&#039;, 15)&#160; &#160; &#160; &#160; // size of the form field<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;setAttrib( &#039;maxlength&#039;, 255)&#160; &#160;// size of table field length<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;addFilter(&#039;StripTags&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;addFilter(&#039;StringTrim&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;removeDecorator(&#039;label&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;removeDecorator(&#039;HtmlTag&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;removeDecorator(&#039;DtDdWrapper&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; //-&gt;removeDecorator(&#039;Errors&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;addValidator(&#039;NotEmpty&#039;, false, array(&#039;messages&#039;=&gt;&#039;Please enter the mouse assigned id number.&#039;))&#160; // only works when setRequired(true)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; //-&gt;addValidator(&#039;regex&#039;, true, array(&#039;/^[\d]/&#039;, &#039;messages&#039;=&gt;&#039;Only numeric values allowed.&#039;))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; //-&gt;addValidator(&#039;Between&#039;, true ,array(0, 24, &#039;messages&#039;=&gt;&#039;Hours value must be between 0 and 24.&#039;))<br />&#160; &#160; &#160; &#160; ;<br />&#160; &#160; &#160; &#160; $this-&gt;set_formElementName( $formFeName );<br />&#160; &#160; &#160; &#160; $this-&gt;set_formElementObject( ${$formFeName} );<br />&#160; &#160; &#160; &#160; $this-&gt;set_formElementObjectsAssoc( $formFeName, ${$formFeName} );<br />&#160; &#160; &#160; &#160; unset( $formFeName );<br />&#160; &#160; &#160; &#160; //============================================================================= <br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;</p><p>&#160; &#160; &#160; &#160; $formFeName =&#160; &#039;diet&#039;;<br />&#160; &#160; &#160; &#160; //=====================================================&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;<br />&#160; &#160; &#160; &#160; $options_{$formFeName} = array( &#039;0&#039;&#160; =&gt; &#039; Please Select Diet&#039; );<br />&#160; &#160; &#160; &#160; $options_{$formFeName} = $this-&gt;_refTableDiet-&gt;getAssocArray(&#039;diet_id&#039;, &#039;diet&#039;, &#039;diet_id ASC&#039;, $options_{$formFeName} ); </p><p>&#160; &#160; &#160; &#160; $this-&gt;addElement( ${$formFeName} = new Zend_Form_Element_Select(&quot;$formFeName&quot;));<br />&#160; &#160; &#160; &#160; //$this-&gt;addElement( ${$formFeName} = new Zend_Form_Element_MultiCheckbox(&quot;$formFeName&quot;));<br />&#160; &#160; &#160; &#160; ${$formFeName}-&gt;setRequired(true)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;setLabel(&#039;Location&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; //-&gt;setValue(&#039;&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; //-&gt;setDescription(&#039;test&#039;)&#160; &#160;<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;setMultiOptions($options_{$formFeName})</p><p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;setAttrib( &#039;title&#039;, &#039;location&#039;)</p><p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;removeDecorator(&#039;label&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;removeDecorator(&#039;HtmlTag&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;removeDecorator(&#039;DtDdWrapper&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; //-&gt;removeDecorator(&#039;Errors&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;addValidator(&#039;NotEmpty&#039;, false, array(&#039;messages&#039;=&gt;&#039;Value is required.&#039;))&#160; // only works when setRequired(true)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;addValidator(&#039;regex&#039;, true, array(&#039;/[^0]/&#039;, &#039;messages&#039;=&gt;&#039;Please specify&#039;))<br />&#160; &#160; &#160; &#160; ;<br />&#160; &#160; &#160; &#160; $this-&gt;set_formElementName( $formFeName );<br />&#160; &#160; &#160; &#160; $this-&gt;set_formElementObject( ${$formFeName} );<br />&#160; &#160; &#160; &#160; $this-&gt;set_formElementObjectsAssoc( $formFeName, ${$formFeName} );<br />&#160; &#160; &#160; &#160; unset( $formFeName );<br />&#160; &#160; &#160; &#160; //===========================================================&#160; &#160; </p><br /><p>&#160; &#160; &#160; &#160; $formFeName =&#160; &#039;submit&#039;;<br />&#160; &#160; &#160; &#160; //======================&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <br />&#160; &#160; &#160; &#160; $this-&gt;addElement( ${$formFeName} = new Zend_Form_Element_Submit(&quot;$formFeName&quot;));<br />&#160; &#160; &#160; &#160; ${$formFeName}-&gt;setAttrib(&#039;id&#039;, &#039;submitbutton&#039;)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;setAttrib( &#039;style&#039;, &#039;background:#ff9999;color:black;&#039;)<br />&#160; &#160; &#160; &#160; <br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -&gt;removeDecorator(&#039;DtDdWrapper&#039;)<br />&#160; &#160; &#160; &#160; ;<br />&#160; &#160; &#160; &#160; $this-&gt;set_formElementName( $formFeName );<br />&#160; &#160; &#160; &#160; $this-&gt;set_formElementObject( ${$formFeName} );<br />&#160; &#160; &#160; &#160; $this-&gt;set_formElementObjectsAssoc( $formFeName, ${$formFeName} );&#160; &#160;<br />&#160; &#160; &#160; &#160; unset( $formFeName );<br />&#160; &#160; &#160; &#160; //=============================================================================&#160; &#160; <br />&#160; &#160; &#160; &#160; <br />&#160; &#160; } // end function: __construct<br />&#160; &#160; <br />} // end class: Expt_Form_DetailsForm<br />[/code]</p><p>This might look like a lot of needless and time consuming code, but all I have to do is copy and paste from some template code and make a few changes.&#160; Sometimes all I may need to do is only assign the name for the code blocks corresponding $formFeName variable.</p><p>The key=&gt;values that I use for the select options are pulled from the model using the following function.</p><p>[code=php]<br />public function getAssocArray($keyColumn=null, $valueColumn=null, $where=null, array $arrFirstPairs=null )<br />&#160; &#160;{<br />&#160; &#160;&#160; &#160;&#160; &#160;$arrPairs = array();<br />&#160; &#160;&#160; &#160;&#160; &#160;<br />&#160; &#160;&#160; &#160;&#160; &#160;<br />&#160; &#160;&#160; &#160;&#160; &#160;if ( ($keyColumn == null) || ($valueColumn == null) ){<br />&#160; &#160;&#160; &#160;&#160; &#160;&#160; &#160; // Throw exception, both inputs are required.<br />&#160; &#160;&#160; &#160;&#160; &#160;}<br />&#160; &#160;&#160; &#160; <br />&#160; &#160;&#160; &#160;&#160; &#160;if ( $where == null ) {<br />&#160; &#160;&#160; &#160;&#160; &#160;&#160; &#160; $where = $valueColumn . &#039; &#039; . &#039;ASC&#039;;<br />&#160; &#160;&#160; &#160;&#160; &#160;}<br />&#160; &#160;&#160; &#160; <br />&#160; &#160;&#160; &#160;&#160; &#160;if ( $arrFirstPairs != null ) {<br />&#160; &#160;&#160; &#160;&#160; &#160; &#160;$arrPairs = $arrFirstPairs; //print_r($arrPairs);die;<br />&#160; &#160;&#160; &#160;&#160; &#160;}<br />&#160; &#160;&#160; &#160;&#160; &#160;<br />&#160; &#160; &#160; $result = $this-&gt;fetchAll(null, $where)-&gt;toArray();</p><p>&#160; &#160;//&#160; &#160;$arrPairs[0] = &#039;Select Type&#039;;<br />&#160; &#160; &#160; foreach ( $result as $row ) {<br />&#160; &#160; &#160; &#160; &#160;$arrPairs[$row[$keyColumn]] = $row[$valueColumn];<br />&#160; &#160; &#160; }<br />&#160; &#160; &#160; &#160;<br />&#160; &#160; &#160; return $arrPairs;<br />&#160; &#160;}<br />[/code]</p><p>You can see that I remove the form decorators for each of the elements, so that associated/imbedded html tags do not interfere with the layout in the view helper.</p><p>Hope this has been helpful for someone out there struggling with how to get that form element on your page in just the precise way that you want it displayed.&#160; One of these days I&#039;ll have to devote some serious study time to understand how decorators work.&#160; They must be a good thing; Else, why was it included in the framework.</p><p>All the best,<br />jim</p>]]></description>
			<author><![CDATA[dummy@example.com (jc)]]></author>
			<pubDate>Wed, 18 Nov 2009 21:24:41 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=364#p364</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is Zend_Form maintainable?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=150#p150</link>
			<description><![CDATA[<div class="quotebox"><cite>Talv wrote:</cite><blockquote><div><p>ive tried using it so many times but just can justify writing that much code which i can rarely get to render as i actually want, i understand the benefits of the validation so it seems i dont get decorators properly, but it just seems too much and the example posted above looked way too long for a 15line peice of HTML markup and validation for 2 input boxes... plus ive never actually worked out how to get other attributes attached to certain elements for example adding a class attribute!</p></div></blockquote></div><p>hey Talv,</p><p>adding an attribute is pretty straightforward. Here I&#039;m adding a class &quot;swap&quot; to the element:</p><p>[code=php]<br />&#160; &#160; $fname = new Zend_Form_Element_Text(&quot;fname&quot;);<br />&#160; &#160; $fname-&gt;setLabel(&quot;Name:&quot;)-&gt;setValue(&quot;First&quot;)-&gt;setRequired(true)<br />&#160; &#160; -&gt;setDecorators($this-&gt;_standardElementDecorator)-&gt;setAttrib(&#039;class&#039;, &#039;swap&#039;);</p><p>[/code]</p><p>Regardless, this markup still feels very verbose.</p>]]></description>
			<author><![CDATA[dummy@example.com (Jon Lebensold)]]></author>
			<pubDate>Thu, 03 Sep 2009 17:51:52 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=150#p150</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is Zend_Form maintainable?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=148#p148</link>
			<description><![CDATA[<p>ive tried using it so many times but just can justify writing that much code which i can rarely get to render as i actually want, i understand the benefits of the validation so it seems i dont get decorators properly, but it just seems too much and the example posted above looked way too long for a 15line peice of HTML markup and validation for 2 input boxes... plus ive never actually worked out how to get other attributes attached to certain elements for example adding a class attribute!</p>]]></description>
			<author><![CDATA[dummy@example.com (Talv)]]></author>
			<pubDate>Wed, 02 Sep 2009 22:35:16 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=148#p148</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is Zend_Form maintainable?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=144#p144</link>
			<description><![CDATA[<p>Zend Form is actually easy and it&#039;s just the decorators that confuse most.&#160; This blog posting helped me quite a bit and I refer to it whenever I start a new form.</p><p><a href="http://zendgeek.blogspot.com/2009/07/zend-form-decorators.html">http://zendgeek.blogspot.com/2009/07/ze … ators.html</a></p>]]></description>
			<author><![CDATA[dummy@example.com (John Nunez)]]></author>
			<pubDate>Wed, 02 Sep 2009 12:49:33 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=144#p144</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is Zend_Form maintainable?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=142#p142</link>
			<description><![CDATA[<p>yes zend form sux all ppl around know it.</p><p>iam using zend form for validators etc but rendering some .phtml</p>]]></description>
			<author><![CDATA[dummy@example.com (aws)]]></author>
			<pubDate>Wed, 02 Sep 2009 08:30:36 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=142#p142</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is Zend_Form maintainable?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=141#p141</link>
			<description><![CDATA[<p>I invested a large amount of time in Zend_Form and whilst I agree that its decorator pattern is confusing at first, it&#039;s a useful thing (and design pattern) to have in your ZF toolkit. It&#039;s almost certain that you need to delve into custom elements and/or view helpers to render the elements exactly as you require but once you&#039;ve done this once you&#039;ll have that knowledge and it&#039;ll be much easier the second time around.</p><p>Though I&#039;ve found this to be by far the hardest and most frustrating area of ZF for beginners, I&#039;ve really starting to make progress once over this hurdle. A thorough knowledge of Zend_Form helps you understand a lot about the framework&#039;s architecture.</p>]]></description>
			<author><![CDATA[dummy@example.com (Tim Fletcher)]]></author>
			<pubDate>Wed, 02 Sep 2009 06:32:04 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=141#p141</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is Zend_Form maintainable?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=140#p140</link>
			<description><![CDATA[<p>Yes Zend forms is a pain!&#160; I started using it in a project and later changed back to straight up HTML.&#160; Forms are not hard to create in html and don&#039;t see the benefit in using Zend_forms.&#160; &#160; &#160; </p><p>I do use the jquery validation plugin (<a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">http://bassistance.de/jquery-plugins/jq … alidation/</a>), which makes client side validation really nice and easy.&#160; I don&#039;t mind doing the server side validation my self.&#160; Easier than trying to learn the Zend_form class imo. </p><p>Also the layout of zend_form is hard to set-up</p>]]></description>
			<author><![CDATA[dummy@example.com (David Dressler)]]></author>
			<pubDate>Wed, 02 Sep 2009 02:37:06 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=140#p140</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is Zend_Form maintainable?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=139#p139</link>
			<description><![CDATA[<div class="quotebox"><cite>wenbert wrote:</cite><blockquote><div><p>You are not the only one. I have been struggling with it the day it came into existence:P</p><p>My previous project, I was so frustrated that I decided not to use it. I manually created the forms in the view and used validation, etc. that came with Zend. It turned out real well and the code is still looks maintainable.</p></div></blockquote></div><p>I&#039;ve heard of people doing that. Works well if you want to Ajaxify the form later. The problem is that you end up essentially writing the view code in two places. I guess there&#039;s no silver bullet for this yet. </p><p>I&#039;m curious what your view script decorators look like. Care to share an example?</p>]]></description>
			<author><![CDATA[dummy@example.com (Jon Lebensold)]]></author>
			<pubDate>Wed, 02 Sep 2009 02:34:55 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=139#p139</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is Zend_Form maintainable?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=138#p138</link>
			<description><![CDATA[<p>You are not the only one. I have been struggling with it the day it came into existence:P</p><p>My previous project, I was so frustrated that I decided not to use it. I manually created the forms in the view and used validation, etc. that came with Zend. It turned out real well and the code is still looks maintainable.</p>]]></description>
			<author><![CDATA[dummy@example.com (wenbert)]]></author>
			<pubDate>Wed, 02 Sep 2009 02:05:19 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=138#p138</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is Zend_Form maintainable?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=137#p137</link>
			<description><![CDATA[<p>I really find Zend_Form&#039;s rendering to be a pain. Love the validation, hate the decorator architecture for sure. I&#039;ve pretty much resorted to using decorator scripts (views/scripts/decorators/) to just render the things with my own code. Can be messy, but you can&#039;t beat it for getting the stupid things to act the way you want them to. Or, at least, I can&#039;t. </p><div class="codebox"><pre><code>$yourForm-&gt;setDecorators( array( array(&#039;ViewScript&#039;, array(&#039;viewScript&#039; =&gt; &#039;decorators/yourDecorator.phtml&#039;) ) ) );</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (James S.)]]></author>
			<pubDate>Wed, 02 Sep 2009 02:03:30 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=137#p137</guid>
		</item>
		<item>
			<title><![CDATA[Is Zend_Form maintainable?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=136#p136</link>
			<description><![CDATA[<p>I&#039;m working on a form for a client right now using Zend_Form. I have a constructor that&#039;s 100 lines just to render the damn thing! Also the decorator architecture is confusing. Am I the only one that feels this way? Does anyone have experience with other programmatic form-builders?</p><p>While Zend_Form has its shortcomings, the built-in validation is a god-send and enables you to easily decouple validation from the form for testing purposes. I&#039;ve thought of moving the form into config, but that additional layer of indirection seems unnecessarily heavy.</p>]]></description>
			<author><![CDATA[dummy@example.com (Jon Lebensold)]]></author>
			<pubDate>Wed, 02 Sep 2009 01:08:33 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=136#p136</guid>
		</item>
	</channel>
</rss>

