<?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"
	>
<channel>
	<title>Komentarze do wpisu: Symfony 1.2 - sfForm - unsetAllExcept - better way?</title>
	<atom:link href="http://blog.adryjanek.eu/2009/05/14/symfony-12-sfform-unsetallexcept-better-way/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adryjanek.eu/2009/05/14/symfony-12-sfform-unsetallexcept-better-way/</link>
	<description>Kamil Adryjanek - projektowanie aplikacji internetowych</description>
	<pubDate>Sat, 31 Jul 2010 09:54:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>Przez: Jasper Lammertink</title>
		<link>http://blog.adryjanek.eu/2009/05/14/symfony-12-sfform-unsetallexcept-better-way/#comment-8005</link>
		<dc:creator>Jasper Lammertink</dc:creator>
		<pubDate>Thu, 24 Sep 2009 15:43:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.adryjanek.eu/?p=43#comment-8005</guid>
		<description>Hidden fields can't be removed because they are beeing used in CRUD actions and maybe also in other actions.

Use this instead:

[code]
public function useFields($fields)
{
    foreach ($this-&#62;getWidgetSchema()-&#62;getFields() as $name =&#62; $widget)
    {
        if (!in_array($name, $fields) &#38;&#38; !$widget-&#62;isHidden())
        {
            unset($this[$name]);
        }
    }
}
[/code]</description>
		<content:encoded><![CDATA[<p>Hidden fields can&#8217;t be removed because they are beeing used in CRUD actions and maybe also in other actions.</p>
<p>Use this instead:</p>
<p>[code]<br />
public function useFields($fields)<br />
{<br />
    foreach ($this-&gt;getWidgetSchema()-&gt;getFields() as $name =&gt; $widget)<br />
    {<br />
        if (!in_array($name, $fields) &amp;&amp; !$widget-&gt;isHidden())<br />
        {<br />
            unset($this[$name]);<br />
        }<br />
    }<br />
}<br />
[/code]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Przez: Symfony 1.2 - using sfForm with jquery validation plugin - part 2 &#124; Projektant - Programista PHP</title>
		<link>http://blog.adryjanek.eu/2009/05/14/symfony-12-sfform-unsetallexcept-better-way/#comment-3992</link>
		<dc:creator>Symfony 1.2 - using sfForm with jquery validation plugin - part 2 &#124; Projektant - Programista PHP</dc:creator>
		<pubDate>Mon, 15 Jun 2009 17:29:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.adryjanek.eu/?p=43#comment-3992</guid>
		<description>[...] Contact form [kontakt]             &#171; Symfony 1.2 - sfForm - unsetAllExcept - better way? [...]</description>
		<content:encoded><![CDATA[<p>[...] Contact form [kontakt]             &laquo; Symfony 1.2 - sfForm - unsetAllExcept - better way? [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
