Re: undefined variable problem $form

2008-05-19 Thread da_student
Try adding var $helpers = array('Form'); in your controller On May 19, 2:33 pm, vishal <[EMAIL PROTECTED]> wrote: > Hi All, > > I am new user on this community.I am not an expert in > cake.so please help me in this issue. > > undefined variable $form > > This is my add.ctp file : > >

Re: undefined variable problem $form

2008-05-19 Thread Reza Muhammad
Hi, I'm also new with CakePHP, but here are some things i noticed: 1. Your validation should be in the model, not controller (app/models/ user.php). 2. Your $form cannot be used in the views, because you havwnt used 'Form' helper in yor controller. Use: var $helpers = array('Html', 'For

Re: undefined variable problem $form

2008-05-19 Thread David Christopher Zentgraf
Hi, 1) $validate goes into the Model, not the controller! http://book.cakephp.org/view/66/models 2) $form is the Helper, and you'll need to specify in the Controller which helpers you want to be able to use in the View. http://book.cakephp.org/view/98/helpers Chrs, Dav On 19 May 2008, at 21:

Re: undefined variable problem $form

2008-05-19 Thread Daniel Hofstetter
Hi Vishal, you have to add the FormHelper to the $helpers array of your controller resp. AppController with var $helpers = array('Form'); See also the section about helpers in the manual: http://book.cakephp.org/view/98/helpers Hope that helps! -- Daniel Hofstetter http://cakebaker.42dh.com

undefined variable problem $form

2008-05-19 Thread vishal
Hi All, I am new user on this community.I am not an expert in cake.so please help me in this issue. undefined variable $form This is my add.ctp file : Add User create('User');?> echo $form->input('name'); echo $form->input('address', array('rows' => '3')); echo $form->inpu

Re: Undefined Variable Problem

2007-07-08 Thread r557
AHH, can't believe i missed that!!! On Jul 8, 2:12 pm, "Larry E. Masters aka PhpNut" <[EMAIL PROTECTED]> wrote: > change: > $product_id = $this->$data['Product']['id']; > > to: > $product_id = $this->data['Product']['id']; > > -- > /** > * @author Larry E. Masters > * @var

Re: Undefined Variable Problem

2007-07-08 Thread Larry E. Masters aka PhpNut
change: $product_id = $this->$data['Product']['id']; to: $product_id = $this->data['Product']['id']; -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @access public */ On 7/8/07, r557 <[EMAIL PROTECTED]> wrote: > > > /*

Undefined Variable Problem

2007-07-08 Thread r557
/ view */ hidden('Product/id')?> image('sundaymorning_cover.jpg', array('class' => 'product_img')); ?> - $ Qty. submit('Add to Cart'); ?> /*** stripped down controller ***/ data)) { $this-