<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Zendcasts Forum - ZC47 – Zend_Form Decorators Explained]]></title>
		<link>http://www.zendcasts.com/forum/topic/144/zc47-zendform-decorators-explained/</link>
		<description><![CDATA[The most recent posts in ZC47 – Zend_Form Decorators Explained.]]></description>
		<lastBuildDate>Tue, 29 Jun 2010 04:54:26 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: ZC47 – Zend_Form Decorators Explained]]></title>
			<link>http://www.zendcasts.com/forum/post/929/#p929</link>
			<description><![CDATA[<p>Ok. I did&#039;t get something.<br />in my source i have <br />&lt;label...<br />&lt;input ...</p><p>&lt;label ...<br />&lt;input... </p><p>so when when i decorate, i wrap and wrap and wrap..<br />but what if i want my labels to be on a row and my elements to be on another row so it will be like</p><p>&lt;tr&gt;&lt;td&gt;&lt;label&gt;&lt;/label&gt;&lt;/td&gt;&lt;td&gt;&lt;label&gt;&lt;/label&gt;&lt;/td&gt;&lt;/tr&gt;<br />&lt;tr&gt;&lt;td&gt;&lt;input/&gt;&lt;/td&gt;&lt;td&gt;&lt;input/&gt;&lt;td&gt;&lt;/tr&gt;<br />how is this going to happen? I can&#039;t figure it out :S</p>]]></description>
			<author><![CDATA[dummy@example.com (SocialEvil)]]></author>
			<pubDate>Tue, 29 Jun 2010 04:54:26 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/post/929/#p929</guid>
		</item>
		<item>
			<title><![CDATA[Re: ZC47 – Zend_Form Decorators Explained]]></title>
			<link>http://www.zendcasts.com/forum/post/884/#p884</link>
			<description><![CDATA[<p>if I wanted to insert errors without &#039;ul&#039; and &#039;li&#039;</p>]]></description>
			<author><![CDATA[dummy@example.com (alessio)]]></author>
			<pubDate>Fri, 04 Jun 2010 10:40:03 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/post/884/#p884</guid>
		</item>
		<item>
			<title><![CDATA[Re: ZC47 – Zend_Form Decorators Explained]]></title>
			<link>http://www.zendcasts.com/forum/post/731/#p731</link>
			<description><![CDATA[<div class="quotebox"><cite>Jon Lebensold wrote:</cite><blockquote><p>just include the &quot;FormErrors&quot; decorator! <img src="http://www.zendcasts.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></blockquote></div><p>That&#039;s excactly what I tried to do.&nbsp; &#039;Errors&#039; shouldn&#039;t be any different than &#039;Label&#039;.&nbsp; So this is what I did:</p><div class="codebox"><pre><code>$this-&gt;setElementDecorators(array( 
       ‘ViewHelper ‘,
       array( &#039;Errors&#039;,
              array( &#039;tag&#039; =&gt; &#039;td&#039;, &#039;placement&#039; =&gt; &#039;APPEND&#039; ),
        array(
            array( ‘data‘ =&gt; ‘HtmlTag‘), 
            array( ‘tag‘ =&gt; ‘td‘,‘class‘ =&gt; ‘element‘ ) 
       ),
       array( ‘Label‘, 
           array( ‘tag‘ =&gt; ‘td‘ )
       ),
       array(
            array(‘row‘ =&gt; ‘HtmlTag‘), 
            array( ‘tag‘ =&gt; ‘tr‘,‘class‘ =&gt; ‘row-element‘ )
       ) 
) );</code></pre></div><p>In my head, it should be no different adding a td tag to the errors than to the label.&nbsp; But my head does not always compute with Zend and in this case, what this does is adding an attribute to the ul element called td.</p><p>So where should I manipulate the Error decorator?&nbsp; I want it to render itself the same ( ul -&gt; li ), but I want it to have an additional td around the ul.</p>]]></description>
			<author><![CDATA[dummy@example.com (zormi)]]></author>
			<pubDate>Mon, 22 Mar 2010 12:35:18 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/post/731/#p731</guid>
		</item>
		<item>
			<title><![CDATA[Re: ZC47 – Zend_Form Decorators Explained]]></title>
			<link>http://www.zendcasts.com/forum/post/718/#p718</link>
			<description><![CDATA[<p>I believe I discovered the flaw but falls in further questions. According to this link:</p><p><a href="http://framework.zend.com/wiki/display/ZFFAQ/Forms">http://framework.zend.com/wiki/display/ZFFAQ/Forms</a></p><p>It needs another decorator, following the example shown in zendcast 47 I can not put the two (File and viewhelp) decorators together. Does anyone have any suggestions?</p><p>Thank you.</p>]]></description>
			<author><![CDATA[dummy@example.com (rafaelcavalcanti)]]></author>
			<pubDate>Sun, 14 Mar 2010 13:38:42 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/post/718/#p718</guid>
		</item>
		<item>
			<title><![CDATA[Re: ZC47 – Zend_Form Decorators Explained]]></title>
			<link>http://www.zendcasts.com/forum/post/712/#p712</link>
			<description><![CDATA[<p>I faced some problems when I used the type &#039;file&#039;.<br />At first showed the error:<br />&quot;Warning: Exception caught by form: No file found ... decorator unable to render file element&quot;<br />Simply place the decorator &#039;File&#039;.</p><p>But from now shows another error:</p><p>Warning: Exception caught by form: Method getMaxFileSize does not exist</p><p>And I stopped here ever since. I tried several configurations:</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $ maxfilesize = new Zend_Form_Element_Hidden ( &#039;form element&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; $ maxfilesize-&gt; setValue (204800);</p><p>&nbsp; &nbsp;$ photo = new Zend_Form_Element_File ( &#039;photo&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; $ photo-&gt; setLabel ( &#039;Photo&#039;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; setValidators (array (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array ( &#039;Count&#039;, false, 1),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array ( &#039;Size&#039;, false, 204800),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array ( &#039;Extension&#039;, false, &#039;jpg, gif, png&#039;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array ( &#039;NotEmpty&#039;, true)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; / / -&gt; setMaxFileSize (20000)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; setRequired (true);</p><p>But still without success. Is there opportunity to help with this?<br />Thank you.<br />Att</p>]]></description>
			<author><![CDATA[dummy@example.com (rafaelcavalcanti)]]></author>
			<pubDate>Tue, 09 Mar 2010 21:03:33 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/post/712/#p712</guid>
		</item>
		<item>
			<title><![CDATA[Re: ZC47 – Zend_Form Decorators Explained]]></title>
			<link>http://www.zendcasts.com/forum/post/679/#p679</link>
			<description><![CDATA[<p>just include the &quot;FormErrors&quot; decorator! <img src="http://www.zendcasts.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Jon Lebensold)]]></author>
			<pubDate>Thu, 25 Feb 2010 14:32:28 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/post/679/#p679</guid>
		</item>
		<item>
			<title><![CDATA[Re: ZC47 – Zend_Form Decorators Explained]]></title>
			<link>http://www.zendcasts.com/forum/post/674/#p674</link>
			<description><![CDATA[<p>Thanks for your useful videos. <br />i want to know how can i decorate error message?<br />and may you create a tutorial about implement WYSIWYG editors on zend framework?</p>]]></description>
			<author><![CDATA[dummy@example.com (ulduz114)]]></author>
			<pubDate>Wed, 24 Feb 2010 20:35:50 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/post/674/#p674</guid>
		</item>
		<item>
			<title><![CDATA[Re: ZC47 – Zend_Form Decorators Explained]]></title>
			<link>http://www.zendcasts.com/forum/post/673/#p673</link>
			<description><![CDATA[<p>Jon,</p><p>Thanks for this informative video.&nbsp; I cannot wait to see your video about custom decorators.</p>]]></description>
			<author><![CDATA[dummy@example.com (kobescoresagain)]]></author>
			<pubDate>Wed, 24 Feb 2010 14:07:04 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/post/673/#p673</guid>
		</item>
		<item>
			<title><![CDATA[Re: ZC47 – Zend_Form Decorators Explained]]></title>
			<link>http://www.zendcasts.com/forum/post/672/#p672</link>
			<description><![CDATA[<p>Finally someone explain in good old english how the damn Decorators works.<br />The Zend_Form_Decorators are a mixed of the Decorator and Strategy Patterns, I believe, the concept is simple but it is hard to get.<br />Jon you&#039;re the man.<br />Thanks</p>]]></description>
			<author><![CDATA[dummy@example.com (rpsimao)]]></author>
			<pubDate>Tue, 23 Feb 2010 22:27:37 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/post/672/#p672</guid>
		</item>
		<item>
			<title><![CDATA[Re: ZC47 – Zend_Form Decorators Explained]]></title>
			<link>http://www.zendcasts.com/forum/post/671/#p671</link>
			<description><![CDATA[<p>Wow what a nice video! I much prefer this style then the other ones. Personnaly I dont really need help coding little functionnality in my websites but a indepth look at a ZF element like form decorators is really great and saves me the hassle of having to discover it all by myself. <br />I&#039;ll try to implement this. As of now I use forms and ViewScript to display custom forms. It works well but it doubles the code I have to write. <br />Keep up the good work!</p>]]></description>
			<author><![CDATA[dummy@example.com (iznogood)]]></author>
			<pubDate>Tue, 23 Feb 2010 17:46:21 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/post/671/#p671</guid>
		</item>
		<item>
			<title><![CDATA[ZC47 – Zend_Form Decorators Explained]]></title>
			<link>http://www.zendcasts.com/forum/post/669/#p669</link>
			<description><![CDATA[<p>One of the pain points for folks who are starting to work with the Zend Framework is the Decorating functionality found in the depths of Zend_Form. I&#039;ve witnessed countless instances when a developer becomes excited by Zend_Form&#039;s easy-to-implement form validation and creation, only to become frustrated by countless hours of fighting with Zend_Form_Decorators. This video is a humble attempt on my part to walk through how Zend_Form Decorators work and how you can reason your way through a desire result. I couldn&#039;t have gotten my own head around this implementation of the decorator pattern without <a href="http://weierophinney.net/matthew/plugin/tag/decorators">Matthew Weier O&#039;Phinney&#039;s excellent posts</a> and <a href="http://devzone.zend.com/article/3450">his original devzone article</a>.</p><p>I&#039;ll show you a bit about how Zend_Form_Decorators are constructed and how to take the default zend_form layout and transform it into a table.</p><p>Grab a <a href="http://zendcasts.googlecode.com/svn/trunk/zc47-zend-form-decorators-explained/zc47-zend-form-decorators-explained.zip">copy of the project</a> or <a href="http://code.google.com/p/zendcasts/source/browse/#svn/trunk/zc47-zend-form-decorators-explained">browse the repository</a>.</p>]]></description>
			<author><![CDATA[dummy@example.com (Jon Lebensold)]]></author>
			<pubDate>Mon, 22 Feb 2010 17:06:46 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/post/669/#p669</guid>
		</item>
	</channel>
</rss>
