<?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: Using embedFormForEach in Symfony</title>
	<atom:link href="http://blog.barros.ws/2008/12/01/using-embedformforeach-in-symfon/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.barros.ws/2008/12/01/using-embedformforeach-in-symfon/</link>
	<description>web development tips</description>
	<lastBuildDate>Mon, 22 Feb 2010 14:03:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nei Rauni Santos</title>
		<link>http://blog.barros.ws/2008/12/01/using-embedformforeach-in-symfon/comment-page-1/#comment-753</link>
		<dc:creator>Nei Rauni Santos</dc:creator>
		<pubDate>Fri, 13 Feb 2009 11:09:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barros.ws/?p=92#comment-753</guid>
		<description>I found the solution of my problem here:

[1] http://trac.symfony-project.org/ticket/4906

Compartilhando a solução com vcs, ficou assim:

No método construtor do form principal:

# adiciona os formulários de quarto no formulário de reserva

  if( count( $book[&#039;rooms&#039;] ) ){
  $form = new sfForm();
  $i = 0;
  foreach( $book[&#039;rooms&#039;] as $room ){
  $form-&gt;embedForm($i, new BookRoomForm( $room ));
  $i++;
  }
  $this-&gt;embedForm(&#039;rooms&#039;, $form);
  }


instancia o form sfForm e adiciona dentro dele cada quarto.


assim o html gerado fica assim:

 
 </description>
		<content:encoded><![CDATA[<p>I found the solution of my problem here:</p>
<p>[1] <a href="http://trac.symfony-project.org/ticket/4906" rel="nofollow">http://trac.symfony-project.org/ticket/4906</a></p>
<p>Compartilhando a solução com vcs, ficou assim:</p>
<p>No método construtor do form principal:</p>
<p># adiciona os formulários de quarto no formulário de reserva</p>
<p>  if( count( $book['rooms'] ) ){<br />
  $form = new sfForm();<br />
  $i = 0;<br />
  foreach( $book['rooms'] as $room ){<br />
  $form-&gt;embedForm($i, new BookRoomForm( $room ));<br />
  $i++;<br />
  }<br />
  $this-&gt;embedForm(&#8216;rooms&#8217;, $form);<br />
  }</p>
<p>instancia o form sfForm e adiciona dentro dele cada quarto.</p>
<p>assim o html gerado fica assim:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nei Rauni Santos</title>
		<link>http://blog.barros.ws/2008/12/01/using-embedformforeach-in-symfon/comment-page-1/#comment-734</link>
		<dc:creator>Nei Rauni Santos</dc:creator>
		<pubDate>Thu, 12 Feb 2009 11:39:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barros.ws/?p=92#comment-734</guid>
		<description>Olá, seu post foi muito útil para mim, estava com um problema da seguinte forma:

tinha 2 forms:
-&gt; formulário de reserva de hotel
-&gt; formulário de quarto

dependendo da escolha do cliente carregava o form de reserva com mais + x RoomForm.

Até neste ponto deu tudo certo, agora vem a questão:

no meu form principal BookForm eu já possuo a lista dos quartos que eu quero carregar, com id e nome, eu precisava inserir os forms de quarto já com alguns valores preenchidos no formulario de reserva. como fazer isso?

olhando a classe eu não vi essa opção.

tem alguma sugestão???

meu code pode ser acessado http://pastebin.com/f701d10f

Aguardo idéias...</description>
		<content:encoded><![CDATA[<p>Olá, seu post foi muito útil para mim, estava com um problema da seguinte forma:</p>
<p>tinha 2 forms:<br />
-&gt; formulário de reserva de hotel<br />
-&gt; formulário de quarto</p>
<p>dependendo da escolha do cliente carregava o form de reserva com mais + x RoomForm.</p>
<p>Até neste ponto deu tudo certo, agora vem a questão:</p>
<p>no meu form principal BookForm eu já possuo a lista dos quartos que eu quero carregar, com id e nome, eu precisava inserir os forms de quarto já com alguns valores preenchidos no formulario de reserva. como fazer isso?</p>
<p>olhando a classe eu não vi essa opção.</p>
<p>tem alguma sugestão???</p>
<p>meu code pode ser acessado <a href="http://pastebin.com/f701d10f" rel="nofollow">http://pastebin.com/f701d10f</a></p>
<p>Aguardo idéias&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos Barros</title>
		<link>http://blog.barros.ws/2008/12/01/using-embedformforeach-in-symfon/comment-page-1/#comment-648</link>
		<dc:creator>Carlos Barros</dc:creator>
		<pubDate>Wed, 04 Feb 2009 23:36:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barros.ws/?p=92#comment-648</guid>
		<description>Hi stu....

I&#039;m not sure how to do it using a new formatter (even though I&#039;m 99% sure it&#039;s possible).. One way I found to do it was by customizing the the _car_form.php template to look like this:&lt;pre lang=&quot;php&quot; line=&quot;1&quot;&gt;&lt;?php foreach($form[&quot;cars&quot;] as $k=&gt;$wg): ?&gt;
                &lt;tr&gt;
                        &lt;th&gt;Cars &lt;?php echo $k+1 ?&gt;&lt;/th&gt;
                        &lt;td&gt;&lt;?php echo $wg; ?&gt;&lt;/td&gt;
                &lt;/tr&gt;
&lt;?php endforeach; ?&gt;&lt;/pre&gt;

Hope this helps

Carlos</description>
		<content:encoded><![CDATA[<p>Hi stu&#8230;.</p>
<p>I&#8217;m not sure how to do it using a new formatter (even though I&#8217;m 99% sure it&#8217;s possible).. One way I found to do it was by customizing the the _car_form.php template to look like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$form</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;cars&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$k</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$wg</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
                &lt;tr&gt;
                        &lt;th&gt;Cars <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$k</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/th&gt;
                        &lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$wg</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;
                &lt;/tr&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Hope this helps</p>
<p>Carlos</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stu</title>
		<link>http://blog.barros.ws/2008/12/01/using-embedformforeach-in-symfon/comment-page-1/#comment-570</link>
		<dc:creator>stu</dc:creator>
		<pubDate>Sat, 31 Jan 2009 20:59:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barros.ws/?p=92#comment-570</guid>
		<description>Great example.  How do I modified the formatter so that instead of Cars (0) it says Car 1?  Also, how do I get rid of the &quot;Cars&quot; on the side?</description>
		<content:encoded><![CDATA[<p>Great example.  How do I modified the formatter so that instead of Cars (0) it says Car 1?  Also, how do I get rid of the &quot;Cars&quot; on the side?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: blog.barros.ws &#187; Using embedFormForEach in Symfony, Part II</title>
		<link>http://blog.barros.ws/2008/12/01/using-embedformforeach-in-symfon/comment-page-1/#comment-439</link>
		<dc:creator>blog.barros.ws &#187; Using embedFormForEach in Symfony, Part II</dc:creator>
		<pubDate>Thu, 01 Jan 2009 21:58:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barros.ws/?p=92#comment-439</guid>
		<description>[...] my last post I talked about embedFormForEach method, that will embed a form inside another N times, and in the [...]</description>
		<content:encoded><![CDATA[<p>[...] my last post I talked about embedFormForEach method, that will embed a form inside another N times, and in the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos Barros</title>
		<link>http://blog.barros.ws/2008/12/01/using-embedformforeach-in-symfon/comment-page-1/#comment-368</link>
		<dc:creator>Carlos Barros</dc:creator>
		<pubDate>Mon, 22 Dec 2008 12:48:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barros.ws/?p=92#comment-368</guid>
		<description>Hi Junho...

Yes, next article is on it&#039;s way and I&#039;ll try to show how to bind CarForm dynamically.. I just need a little bit of time to finish it up!!

Carlos</description>
		<content:encoded><![CDATA[<p>Hi Junho&#8230;</p>
<p>Yes, next article is on it&#8217;s way and I&#8217;ll try to show how to bind CarForm dynamically.. I just need a little bit of time to finish it up!!</p>
<p>Carlos</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Junho</title>
		<link>http://blog.barros.ws/2008/12/01/using-embedformforeach-in-symfon/comment-page-1/#comment-365</link>
		<dc:creator>Junho</dc:creator>
		<pubDate>Sun, 21 Dec 2008 00:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barros.ws/?p=92#comment-365</guid>
		<description>Great article! I subscribed to your blog feed.

I&#039;m very curious to see the next one about dynamically updating the form. I failed to search that example on the web so far.

On your next article, would you show how to bind CarForm for each form added dynamically, if it&#039;s possible?</description>
		<content:encoded><![CDATA[<p>Great article! I subscribed to your blog feed.</p>
<p>I&#8217;m very curious to see the next one about dynamically updating the form. I failed to search that example on the web so far.</p>
<p>On your next article, would you show how to bind CarForm for each form added dynamically, if it&#8217;s possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rpsblog.com &#187; A week of symfony #101 (1-&#38;gt;7 december 2008)</title>
		<link>http://blog.barros.ws/2008/12/01/using-embedformforeach-in-symfon/comment-page-1/#comment-266</link>
		<dc:creator>rpsblog.com &#187; A week of symfony #101 (1-&#38;gt;7 december 2008)</dc:creator>
		<pubDate>Mon, 08 Dec 2008 01:07:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barros.ws/?p=92#comment-266</guid>
		<description>[...] Using embedFormForEach in Symfony [...]</description>
		<content:encoded><![CDATA[<p>[...] Using embedFormForEach in Symfony [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
