Also, FormHelper is from CakePHP 1.2, I think you are using 1.1.

On Oct 10, 7:13 am, Adwin  Wijaya <[EMAIL PROTECTED]> wrote:
> in your controller
> add this  at the top one
>
> var $helpers = array('Html', 'Form' );
>
> On Oct 9, 6:36 pm, Justin <[EMAIL PROTECTED]> wrote:
>
> > first time cake user, trying to get up to speed.
>
> > I want to use the FormHelper, but when I do it tells me that no such object
> > exists.
>
> > Code (register.thtml):
>
> > <? echo $this->form->create('Newuser',array('default'=> false)); ?>
> > <?php echo $form->end();?>; ?>
>
> > Result:
> > *
> > *
>
> > *Notice* (8) <javascript:void(0);>: Undefined property:  View::$form
> > [*CORE/app/views/users/register.thtml*, line *2*]
>
> > Context <javascript:void(0);> | Code <javascript:void(0);>
>
> > $this   =       View object
> > $___viewFn      =       
> > "/home/justin/workspace/cake/app/views/users/register.thtml"
> > $___dataForView =       array()
> > $loadHelpers    =       true
> > $cached =       false
> > $loadedHelpers  =       array("Html" => HtmlHelper object, "Session" =>
> > SessionHelper object)
> > $helper =       SessionHelper object
> > $replace        =       "s"
> > $camelBackedHelper      =       "session"
> > $html   =       HtmlHelper object
> > $session        =       SessionHelper object
> > $BASE   =       "/cake"
> > $params =       array("pass" => array, "controller" => "users", "action" =>
> > "register", "url" => array, "bare" => 0, "webservices" => null,
> > "plugin" => null, "models" => array)
> > $page_title     =       false
>
> > <? echo $this->form->create('Newuser',array('default'=> false));
> > ?><?php echo $form->end();?>; ?>
>
> > include - CORE/app/views/users/register.thtml, line 2
> > View::_render() - CORE/cake/libs/view/view.php, line 772
> > View::render() - CORE/cake/libs/view/view.php, line 337
> > Controller::render() - CORE/cake/libs/controller/controller.php, line 663
> > UsersController::register() - CORE/app/controllers/users_controller.php, 
> > line 60
> > Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 353
> > Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 333
> > [main] - CORE/app/webroot/index.php, line 83
>
> > *Fatal error*: Call to a member function create() on a non-object in *
> > /home/justin/workspace/cake/app/views/users/register.thtml* on line *2
>
> > *
>
> > ---------------
>
> > Am I missing something here?


--~--~---------~--~----~------------~-------~--~----~
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