<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Page comments</title>
		<link>http://www.ssbits.com/home/</link>
		<atom:link href="http://www.ssbits.com/home/" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title></title>
			<link>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1306</link>
			<description>Aram --

Thanks for the great module. It's an awesome point to build from. (An aside:  www.mymuswell.com is a fantastic site. Well done.)

I just noticed that if you try to have a db field in an object with the same name as the object, it breaks the SQL queries the module uses. (I had a Quote object that had an HTML db field called Quote and another field called Author.) Probably a small thing since it's likely not best practice for a field in an object to share the object's name. Changing the field name solved the problem.
</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1306</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1305</link>
			<description>@ jakmax - no problem! Glad you got it working :)</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1305</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1304</link>
			<description>Thank you very much Aram!</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1304</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1303</link>
			<description>ok great Aram!

i change my code and it's work great!!

function PostComments() {
	
			
	
      	// Create fields
 		$Params = Director::urlParams();
	    $fields = new FieldSet(
		    new TextField('Nome', 'Nome *'),
		    new TextareaField('Commento', 'Commento *'),
			new HiddenField('ProductID','ProductID',''),
			
			new PhpCaptchaField('Captcha','') 
			
		);
	 	if($Product = $this-&gt;getCurrentProduct())
        {
		$fields-&gt;push(new HiddenField('ProductID','ProductID',$Product-&gt;ID));
		}
	    // Create action
	    $actions = new FieldSet(
	    	new FormAction('SendComment', 'Invia')
	    );</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1303</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1302</link>
			<description>i tried: 

 $fields = new FieldSet(
		    new TextField('Nome', 'Nome *'),
		    new TextareaField('Commento', 'Commento *'),
			/*new HiddenField('ProductID','ProductID','88'),*/
			
			new PhpCaptchaField('Captcha','') 
			
		);
	 	if($Product = $this-&gt;getCurrentProduct())
        {
		$fields-&gt;push(new HiddenField('ProductID','ProductID',$Product-&gt;ID));
		}

but the value in DB is 0

:-(</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1302</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1301</link>
			<description>@jakmax - ahh yea, you need to wrap it in an if() because when the form submits, it doesnt actually have a URl ID anymore, try this:

if($product = $this-&gt;getCurrentProduct)
{
$fields-&gt;push(new HiddenField('ProductID','ProductID',$product-&gt;ID));
}</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1301</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1300</link>
			<description>Hi Aram,
I almost solved, but when I try to pass the hidden field I get the following error:
[Notice] Trying to get property of non-object
my hidden field is:
new HiddenField ('ProductID', 'ProductID', $ this-&gt; getCurrentProduct () -&gt; ID)
where I'm wrong?
Thanks

jakmax</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1300</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1299</link>
			<description>@bart - Great! Let me know how you find it :)

Aram</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1299</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1298</link>
			<description>Hi Aram,

Thanks a lot for sharing this at exactly the right moment.
We're going to look into this for our project which can use this tomorrow!

Cheers,

Bart</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1298</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1297</link>
			<description>ok I think I understand ;-)
I'll try tonight and then I can tell you ..
Meanwhile, thank you very much

Jakmax</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/#PageComment_1297</guid>
		</item>
		

	</channel>
</rss>
