OK, cool thanks. The comment is saving properly now.

so i have this:

echo $form->textarea('ForumComment.comment', array('rows'=>5));
                if ($form->isFieldError('ForumCommentComment')){
                        echo $form->error('ForumCommentComment');
                }

if the comment is blank, how do i raise the error for that field? It
dosn't do it automagicaly.

On Oct 6, 2:29 am, brian <[email protected]> wrote:
> On Mon, Oct 5, 2009 at 2:52 AM, vekija <[email protected]> wrote:
>
> > You'll have to save the topic first and then fetch it's id. From the
> > cookbook: "If neither of the associated model records exists in the
> > system yet (for example, you want to save a new User and their related
> > Profile records at the same time), you'll need to first save the
> > primary, or parent 
> > model."http://book.cakephp.org/view/84/Saving-Related-Model-Data-hasOne-hasM...
>
> You could force Cake to create a textarea anyway
> ($form->textarea('ForumComment.comment')) and, after saving the Topic,
> get the ID and add it to $this->data['ForumComment']['topic_id'] (or
> however your model is configured).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to