<?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: Improving the Forms: Layouts and Formatters</title>
	<atom:link href="http://webmozarts.com/2009/04/23/improving-the-forms-layouts-and-formatters/feed/" rel="self" type="application/rss+xml" />
	<link>http://webmozarts.com/2009/04/23/improving-the-forms-layouts-and-formatters/</link>
	<description>On The Art Of Web Development</description>
	<lastBuildDate>Mon, 30 Aug 2010 03:06:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Pete BD</title>
		<link>http://webmozarts.com/2009/04/23/improving-the-forms-layouts-and-formatters/comment-page-1/#comment-318</link>
		<dc:creator>Pete BD</dc:creator>
		<pubDate>Mon, 13 Jul 2009 11:01:56 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=230#comment-318</guid>
		<description>@David: In SilverStripe CMS they have a method on forms to return a flattened data structure for easily managing the values.  So while getData() might return a nested array:

array(
  &#039;group1&#039; =&gt; array(
    &#039;name&#039; =&gt; &#039;The name&#039;,
    &#039;email&#039; =&gt; &#039;thename@gmail.com&#039;,
  ),
  &#039;password&#039; =&gt; array(
    &#039;first&#039; =&gt; &#039;The password&#039;,
    &#039;second&#039; =&gt; &#039;The password&#039;,
  ),
)

getValues() would return a flattened array
array(
    &#039;name&#039; =&gt; &#039;The name&#039;,
    &#039;email&#039; =&gt; &#039;thename@gmail.com&#039;,
    &#039;password&#039; =&gt; &#039;The password&#039;,
)

But you notice that each fieldgroup type is able to say how its values are flattened.  The password field only returns one value whereas the generic group returns two.</description>
		<content:encoded><![CDATA[<p>@David: In SilverStripe CMS they have a method on forms to return a flattened data structure for easily managing the values.  So while getData() might return a nested array:</p>
<p>array(<br />
  &#8216;group1&#8242; =&gt; array(<br />
    &#8216;name&#8217; =&gt; &#8216;The name&#8217;,<br />
    &#8216;email&#8217; =&gt; &#8216;thename@gmail.com&#8217;,<br />
  ),<br />
  &#8216;password&#8217; =&gt; array(<br />
    &#8216;first&#8217; =&gt; &#8216;The password&#8217;,<br />
    &#8217;second&#8217; =&gt; &#8216;The password&#8217;,<br />
  ),<br />
)</p>
<p>getValues() would return a flattened array<br />
array(<br />
    &#8216;name&#8217; =&gt; &#8216;The name&#8217;,<br />
    &#8216;email&#8217; =&gt; &#8216;thename@gmail.com&#8217;,<br />
    &#8216;password&#8217; =&gt; &#8216;The password&#8217;,<br />
)</p>
<p>But you notice that each fieldgroup type is able to say how its values are flattened.  The password field only returns one value whereas the generic group returns two.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete BD</title>
		<link>http://webmozarts.com/2009/04/23/improving-the-forms-layouts-and-formatters/comment-page-1/#comment-317</link>
		<dc:creator>Pete BD</dc:creator>
		<pubDate>Mon, 13 Jul 2009 10:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=230#comment-317</guid>
		<description>@Duane: RE: Multi-part forms
Since sfForm is just a kind of fieldgroup, how about a form object (perhaps sfMultiForm) to which you add multiple sfForm objects?

Then you could select which of the subforms to render/validate at any point in the process but still have access to the full submitted data at any point for processing/validation.</description>
		<content:encoded><![CDATA[<p>@Duane: RE: Multi-part forms<br />
Since sfForm is just a kind of fieldgroup, how about a form object (perhaps sfMultiForm) to which you add multiple sfForm objects?</p>
<p>Then you could select which of the subforms to render/validate at any point in the process but still have access to the full submitted data at any point for processing/validation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete BD</title>
		<link>http://webmozarts.com/2009/04/23/improving-the-forms-layouts-and-formatters/comment-page-1/#comment-316</link>
		<dc:creator>Pete BD</dc:creator>
		<pubDate>Mon, 13 Jul 2009 10:55:29 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=230#comment-316</guid>
		<description>@Duane: RE: Multi-part forms
Since sfForm is just a kind of fieldgroup, how about a form object (perhaps sfMultiForm) to which you add multiple sfForm objects?#


Then you could select which of the subforms to render/validate at any point in the process but still have access to the full submitted data at any point for processing/validation.</description>
		<content:encoded><![CDATA[<p>@Duane: RE: Multi-part forms<br />
Since sfForm is just a kind of fieldgroup, how about a form object (perhaps sfMultiForm) to which you add multiple sfForm objects?#</p>
<p>Then you could select which of the subforms to render/validate at any point in the process but still have access to the full submitted data at any point for processing/validation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete BD</title>
		<link>http://webmozarts.com/2009/04/23/improving-the-forms-layouts-and-formatters/comment-page-1/#comment-315</link>
		<dc:creator>Pete BD</dc:creator>
		<pubDate>Mon, 13 Jul 2009 10:51:33 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=230#comment-315</guid>
		<description>@Alex and @Bernard: RE: non-editable forms.  I guess that setting a field group (or a whole form for that matter) to non-editable (I prefer readonly) would filter down to all its child fields?
Then to show a form in a non-editable mode you would just add this in the configure() method of the form itself.

$this-&gt;setEditable(false)

Pete</description>
		<content:encoded><![CDATA[<p>@Alex and @Bernard: RE: non-editable forms.  I guess that setting a field group (or a whole form for that matter) to non-editable (I prefer readonly) would filter down to all its child fields?<br />
Then to show a form in a non-editable mode you would just add this in the configure() method of the form itself.</p>
<p>$this-&gt;setEditable(false)</p>
<p>Pete</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias</title>
		<link>http://webmozarts.com/2009/04/23/improving-the-forms-layouts-and-formatters/comment-page-1/#comment-277</link>
		<dc:creator>Matthias</dc:creator>
		<pubDate>Sun, 05 Jul 2009 16:28:10 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=230#comment-277</guid>
		<description>What is the state of this topic? Any response from Fabien about it?

I noticed that it or at least parts of it are implemented in the ullright project.

Well, when thinking ahead you also need to keep the past in mind. That said, I don&#039;t think that the complete ideas from all these posts will never make it into symfony. That&#039;s because they introduce too much (additional) magic. Something that Fabien doesn&#039;t like and, to be honest, I also don&#039;t see a real advantage because you loose the full control over what you are coding.

Apart from that I like the concept of &quot;form field abstraction&quot; very much and I also don&#039;t understand why the concept of plain fields (editable/non-editable) was not introduced, yet.

So.. as a conclusion I think it is important to concentrate on the most important things that should be improved on the form framework and then start another RFC / ticket / or whatever and (most importantly) start a dialogue with Fabien..  otherwise this all will never lead to any useful results..   ;-)</description>
		<content:encoded><![CDATA[<p>What is the state of this topic? Any response from Fabien about it?</p>
<p>I noticed that it or at least parts of it are implemented in the ullright project.</p>
<p>Well, when thinking ahead you also need to keep the past in mind. That said, I don&#8217;t think that the complete ideas from all these posts will never make it into symfony. That&#8217;s because they introduce too much (additional) magic. Something that Fabien doesn&#8217;t like and, to be honest, I also don&#8217;t see a real advantage because you loose the full control over what you are coding.</p>
<p>Apart from that I like the concept of &#8220;form field abstraction&#8221; very much and I also don&#8217;t understand why the concept of plain fields (editable/non-editable) was not introduced, yet.</p>
<p>So.. as a conclusion I think it is important to concentrate on the most important things that should be improved on the form framework and then start another RFC / ticket / or whatever and (most importantly) start a dialogue with Fabien..  otherwise this all will never lead to any useful results..   <img src='http://webmozarts.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernhard</title>
		<link>http://webmozarts.com/2009/04/23/improving-the-forms-layouts-and-formatters/comment-page-1/#comment-160</link>
		<dc:creator>Bernhard</dc:creator>
		<pubDate>Fri, 05 Jun 2009 09:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=230#comment-160</guid>
		<description>@Alex: I did already write about this in my first post of this series:
http://webmozarts.com/2009/04/12/improving-the-forms/

You can find my suggestions by scrolling down to the headline &quot;Editable vs. Non-Editable&quot;.</description>
		<content:encoded><![CDATA[<p>@Alex: I did already write about this in my first post of this series:<br />
<a href="http://webmozarts.com/2009/04/12/improving-the-forms/" rel="nofollow" class="liinternal">http://webmozarts.com/2009/04/12/improving-the-forms/</a></p>
<p>You can find my suggestions by scrolling down to the headline &#8220;Editable vs. Non-Editable&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Knol</title>
		<link>http://webmozarts.com/2009/04/23/improving-the-forms-layouts-and-formatters/comment-page-1/#comment-159</link>
		<dc:creator>Alex Knol</dc:creator>
		<pubDate>Fri, 05 Jun 2009 08:50:31 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=230#comment-159</guid>
		<description>I have read your posts with interest.

The reason i got your blog is this:
When coding an application in symfony 1.2 using the current forms, you often need a view / edit combination of the form data. 

I have looked around for such a possibility, but have not been able to find anything that comes close. Please correct me if i&#039;m wrong!

In the current situation you need to code the entire view by hand and in &#039;view&#039; mode and use the forms in &#039;edit mode despite the great similarities between two. Not to mention the overhead in template code.

I am thinking of a posibility to call echo $form-&gt;renderViewOnly() or something in the template. possibly extending the generator for forms or just extending the renderclasses.

Have you given any thought to this subject in you contemplations on Symfony forms?</description>
		<content:encoded><![CDATA[<p>I have read your posts with interest.</p>
<p>The reason i got your blog is this:<br />
When coding an application in symfony 1.2 using the current forms, you often need a view / edit combination of the form data. </p>
<p>I have looked around for such a possibility, but have not been able to find anything that comes close. Please correct me if i&#8217;m wrong!</p>
<p>In the current situation you need to code the entire view by hand and in &#8216;view&#8217; mode and use the forms in &#8216;edit mode despite the great similarities between two. Not to mention the overhead in template code.</p>
<p>I am thinking of a posibility to call echo $form-&gt;renderViewOnly() or something in the template. possibly extending the generator for forms or just extending the renderclasses.</p>
<p>Have you given any thought to this subject in you contemplations on Symfony forms?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duane Gran</title>
		<link>http://webmozarts.com/2009/04/23/improving-the-forms-layouts-and-formatters/comment-page-1/#comment-144</link>
		<dc:creator>Duane Gran</dc:creator>
		<pubDate>Thu, 21 May 2009 13:31:50 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=230#comment-144</guid>
		<description>I&#039;ve really been enjoying this series you have been writing and I believe the proposals will really improve the form system in symfony, which is already quite good. I would be curious if you have ideas on how multiple part forms might be handled best.  I posted some questions about it here:

http://forum.symfony-project.org/index.php/m/78775/

Often you need to break a form into segments that aren&#039;t coincident with the schema but you still want validation at each step.  I imagine a scenario where you can display a subset of form elements drawing from one or more models but only the subset of displayed form controls are validated.  Is such a thing possible in symfony today?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve really been enjoying this series you have been writing and I believe the proposals will really improve the form system in symfony, which is already quite good. I would be curious if you have ideas on how multiple part forms might be handled best.  I posted some questions about it here:</p>
<p><a href="http://forum.symfony-project.org/index.php/m/78775/" rel="nofollow" target="_blank" class="liexternal">http://forum.symfony-project.org/index.php/m/78775/</a></p>
<p>Often you need to break a form into segments that aren&#8217;t coincident with the schema but you still want validation at each step.  I imagine a scenario where you can display a subset of form elements drawing from one or more models but only the subset of displayed form controls are validated.  Is such a thing possible in symfony today?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Allison</title>
		<link>http://webmozarts.com/2009/04/23/improving-the-forms-layouts-and-formatters/comment-page-1/#comment-143</link>
		<dc:creator>Andrew Allison</dc:creator>
		<pubDate>Thu, 21 May 2009 08:12:42 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=230#comment-143</guid>
		<description>Ah Man.. This is exactly what I&#039;ve been looking for I&#039;m working on a project with some very meaty forms and this would be Ideal... Shame..... Oh well back to hand coding 20+ fields D&#039;oh :D</description>
		<content:encoded><![CDATA[<p>Ah Man.. This is exactly what I&#8217;ve been looking for I&#8217;m working on a project with some very meaty forms and this would be Ideal&#8230; Shame&#8230;.. Oh well back to hand coding 20+ fields D&#8217;oh <img src='http://webmozarts.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rubino</title>
		<link>http://webmozarts.com/2009/04/23/improving-the-forms-layouts-and-formatters/comment-page-1/#comment-63</link>
		<dc:creator>Rubino</dc:creator>
		<pubDate>Mon, 11 May 2009 00:48:20 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=230#comment-63</guid>
		<description>Very nice idea - you should consider implementing a server side version of what&#039;s outlined in CSS3 - there&#039;s some good approaches to layouts defined and some great examples.

There&#039;s even a jQuery lib that implements it now for browsers.</description>
		<content:encoded><![CDATA[<p>Very nice idea &#8211; you should consider implementing a server side version of what&#8217;s outlined in CSS3 &#8211; there&#8217;s some good approaches to layouts defined and some great examples.</p>
<p>There&#8217;s even a jQuery lib that implements it now for browsers.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
