<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Zendcasts Forum / Dynamic Zend_Form ?]]></title>
		<link>http://www.zendcasts.com/forum/viewtopic.php?id=177</link>
		<description><![CDATA[The most recent posts in Dynamic Zend_Form ?.]]></description>
		<lastBuildDate>Tue, 19 Oct 2010 10:05:03 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Dynamic Zend_Form ?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=1106#p1106</link>
			<description><![CDATA[<p>Have a look at this blog entry:<br /><a href="http://www.tibobeijen.nl/blog/2009/12/21/zend_form-building-dynamic-forms/">http://www.tibobeijen.nl/blog/2009/12/2 … mic-forms/</a><br /> I think it may help you!</p>]]></description>
			<author><![CDATA[dummy@example.com (rafa_esteller)]]></author>
			<pubDate>Tue, 19 Oct 2010 10:05:03 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=1106#p1106</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dynamic Zend_Form ?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=811#p811</link>
			<description><![CDATA[<p>You should be able to create a class that extends Zend_Form.<br /></p><div class="codebox"><pre><code>class SomeForm extends Zend_Form
{
   public function init($fields_array)
   {
        foreach($fields_array as $field){

           $this-&gt;addElement(&#039;textarea&#039;, $field-&gt;name, array(
        &#039;label&#039;      =&gt; $field-&gt;label,
        &#039;required&#039;   =&gt; $field-&gt;required,
        &#039;rows&#039;       =&gt; $field-&gt;rows,
        &#039;cols&#039;       =&gt; $field-&gt;cols,
        &#039;validators&#039; =&gt; array(
        &#039;NotEmpty&#039;,
        )
        ));
         }     
     }
}</code></pre></div><p>Add a switch statement to switch between different field types and you should be good. There is probably a better solution but this one should work pretty well. </p><p>BTW I wrote the code directly here so there could be errors.</p>]]></description>
			<author><![CDATA[dummy@example.com (iznogood)]]></author>
			<pubDate>Wed, 21 Apr 2010 19:41:15 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=811#p811</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dynamic Zend_Form ?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=809#p809</link>
			<description><![CDATA[<p>Maybe a good tutorial suggestion for you Jon <img src="http://www.zendcasts.com/forum/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Ryan Johnston)]]></author>
			<pubDate>Wed, 21 Apr 2010 19:31:01 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=809#p809</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dynamic Zend_Form ?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=807#p807</link>
			<description><![CDATA[<p>I&#039;ve been wondering exactly the same (if I understad you correctly).</p>]]></description>
			<author><![CDATA[dummy@example.com (harri)]]></author>
			<pubDate>Wed, 21 Apr 2010 17:27:41 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=807#p807</guid>
		</item>
		<item>
			<title><![CDATA[Dynamic Zend_Form ?]]></title>
			<link>http://www.zendcasts.com/forum/viewtopic.php?pid=805#p805</link>
			<description><![CDATA[<p>Hi,</p><p>Is it possible to create a Zend_Form with dynamic elements?</p><p>What I mean is say when a user changes an option in a select box of the Zend_Form it then uses jQuery to pull extra elements from Zend_Form and populate. Then when you post the form it validates correctly based on the elements that were presented in the Dynamic Zend_Form.</p><p>Cheers,<br />Ryan</p>]]></description>
			<author><![CDATA[dummy@example.com (Ryan Johnston)]]></author>
			<pubDate>Mon, 19 Apr 2010 03:08:41 +0000</pubDate>
			<guid>http://www.zendcasts.com/forum/viewtopic.php?pid=805#p805</guid>
		</item>
	</channel>
</rss>

