If data is set on controller you can access it trough
$form->value('Model.field'); in your views.

On Sun, Mar 2, 2008 at 8:00 AM, Jason <[EMAIL PROTECTED]> wrote:
>
>  I have tried the following and it works. However I am getting a
>  warning..
>
>  Controller.
>
>  function edit($id = null) {
>         if (empty($this->data)) {
>                 $this->Content->id = $id;
>                 $this->data = $this->Content->read();
>         } else {
>                 if ($this->Content->save($this->data['Content'])) {
>                         $this->flash('Your post has been updated.','/posts');
>                 }
>         }
>  }
>
>  edit.ctp
>
>  echo $form->select('page', $page, $data['Content']['page'], '', TRUE);
>
>  Warning
>
>  Notice (8): Undefined variable: data [APP/views/content/edit.ctp, line
>  17]
>
>
>  How do I get rid of this warning?
>
>
>
>  >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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