I had this same error, because i Was using cake 1.1, which doesn;t have a
formHelper, only a htmlHelper. That tutorial applies to cake 1.2.
I just start using 1.2 and it works perfectly. You may want to upgrade as
well, or use the old blog tutorial that uses the htmlHelper.
Regards,
Marcos
On Wed, May 21, 2008 at 12:31 PM, patcoll <[EMAIL PROTECTED]> wrote:
>
> It seems as though you don't have the FormHelper loaded by default.
> Add this line as an attribute in your controller:
>
> var $helpers = array('Html', 'Form');
>
> And the view should load the FormHelper into that $form variable
> automagically.
>
> HTH
>
> On May 21, 12:34 pm, Lokase <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have completed the blog tutorial up to the add.ctp section.
> >
> > The link from the view is hitting the add.ctp file but I am getting a
> > "Call to a member function on a non-object" error on the first line of
> > the PHP code:
> >
> > <h1>Add Post</h1>
> > <?php
> > echo $form->create('Post');
> > //echo $form->input('title');
> > //echo $form->input('body', array('rows' => '3'));
> > //echo $form->end('Save Post');
> > ?>
> >
> > Any suggestions of where I may be going wrong?
> >
> > Thanks,
> >
> > Lokase
> >
>
--
Marcos Aruj Alvarez
Ingeniero de Software
-------------------------------
[EMAIL PROTECTED]
-----
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---