You would of course have to pass the post_id manually to the view and add a hidden input field:

$this->Form->input('Model.post_id', array('type' => 'hidden', 'value' => $post_id));

This way the post id will be added to $this->data and saved to the database (if the form is valid of course).

Kind regards
Thomas

On 12.10.2011 09:51, Media Affect wrote:
Does anyone have an example of a controller for passing the post_id to
a comments add controller they would share? Does sessions need to be
on? I don't want a dropdown after baking. I can get the post_id into
the comments add url but, it won't seem to add the post_id to the
database?


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to