<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Iterating over Symfony Forms for Custom Output</title>
	<atom:link href="http://shout.setfive.com/2009/06/19/iterating-over-symfony-forms-for-custom-output/feed/" rel="self" type="application/rss+xml" />
	<link>http://shout.setfive.com/2009/06/19/iterating-over-symfony-forms-for-custom-output/</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 20:44:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Dan</title>
		<link>http://shout.setfive.com/2009/06/19/iterating-over-symfony-forms-for-custom-output/comment-page-1/#comment-979</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 07 Dec 2009 14:22:43 +0000</pubDate>
		<guid isPermaLink="false">http://shout.setfive.com/?p=187#comment-979</guid>
		<description>Great solutions, but I have a question. I`ve some embeded form and submit button is render before first embeded form. How can i change this to render submit after all embeded forms?</description>
		<content:encoded><![CDATA[<p>Great solutions, but I have a question. I`ve some embeded form and submit button is render before first embeded form. How can i change this to render submit after all embeded forms?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Daum</title>
		<link>http://shout.setfive.com/2009/06/19/iterating-over-symfony-forms-for-custom-output/comment-page-1/#comment-782</link>
		<dc:creator>Matt Daum</dc:creator>
		<pubDate>Fri, 28 Aug 2009 11:10:12 +0000</pubDate>
		<guid isPermaLink="false">http://shout.setfive.com/?p=187#comment-782</guid>
		<description>Kevin-  

Great example.  I&#039;ve posted your code at the bottom of this comment for reference.  In our example we actually had a specific layout for the embedded form (first embedded form that is).  In this case you could add to your example a $level variable and passed that through each recursion in order to format the form differently per level.

&lt;pre class=&quot;php&quot; name=&quot;code&quot;&gt;
function display_form($form) {
  foreach($form as $field) {
    if (get_class($field) == &#039;sfFormFieldSchema&#039;) {
      display_form($field);
    } elseif (!$field-&gt;isHidden()) {
      echo $field-&gt;renderRow();
    }
  }
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Kevin-  </p>
<p>Great example.  I&#8217;ve posted your code at the bottom of this comment for reference.  In our example we actually had a specific layout for the embedded form (first embedded form that is).  In this case you could add to your example a $level variable and passed that through each recursion in order to format the form differently per level.</p>
<pre class="php" name="code">
function display_form($form) {
  foreach($form as $field) {
    if (get_class($field) == 'sfFormFieldSchema') {
      display_form($field);
    } elseif (!$field-&gt;isHidden()) {
      echo $field-&gt;renderRow();
    }
  }
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kévin Dunglas</title>
		<link>http://shout.setfive.com/2009/06/19/iterating-over-symfony-forms-for-custom-output/comment-page-1/#comment-781</link>
		<dc:creator>Kévin Dunglas</dc:creator>
		<pubDate>Fri, 28 Aug 2009 07:57:13 +0000</pubDate>
		<guid isPermaLink="false">http://shout.setfive.com/?p=187#comment-781</guid>
		<description>Oops, it seems that your comment system eat the code !
Check the correct code at http://github.com/dunglas/piy/blob/638f9c5bbfbe883d301bcf2c7bfa94509791d41b/apps/frontend/modules/sfGuardAuth/templates/registerSuccess.php</description>
		<content:encoded><![CDATA[<p>Oops, it seems that your comment system eat the code !<br />
Check the correct code at <a href="http://github.com/dunglas/piy/blob/638f9c5bbfbe883d301bcf2c7bfa94509791d41b/apps/frontend/modules/sfGuardAuth/templates/registerSuccess.php" rel="nofollow">http://github.com/dunglas/piy/blob/638f9c5bbfbe883d301bcf2c7bfa94509791d41b/apps/frontend/modules/sfGuardAuth/templates/registerSuccess.php</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kévin Dunglas</title>
		<link>http://shout.setfive.com/2009/06/19/iterating-over-symfony-forms-for-custom-output/comment-page-1/#comment-780</link>
		<dc:creator>Kévin Dunglas</dc:creator>
		<pubDate>Fri, 28 Aug 2009 07:55:16 +0000</pubDate>
		<guid isPermaLink="false">http://shout.setfive.com/?p=187#comment-780</guid>
		<description>The same but recursive and with support of any level of embedded forms:

isHidden()) {
      echo $field-&gt;renderRow();
    }
  }
}

echo $form-&gt;renderHiddenFields();
echo $form-&gt;renderGlobalErrors();
display_form($form);
?&gt;</description>
		<content:encoded><![CDATA[<p>The same but recursive and with support of any level of embedded forms:</p>
<p>isHidden()) {<br />
      echo $field-&gt;renderRow();<br />
    }<br />
  }<br />
}</p>
<p>echo $form-&gt;renderHiddenFields();<br />
echo $form-&gt;renderGlobalErrors();<br />
display_form($form);<br />
?&gt;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

