Hi Mona,

Well, it would help if you could specify the error a bit more. The
form need to be called 'app/views/users/add.ctp'.

I don't know if you can make "echo $form->inputs(array('name',
'email', 'password'));"

I would rather do:
  echo $form->input('User.name');
  echo $form->input('User.password', array ('type' => 'password));
  echo $form->input('User.email');

bye
me.


On Dec 23, 3:17 pm, mona <poojapinj...@gmail.com> wrote:
> I m new to cake php i want to make form in cakephp and i make the
> following things
>     class User extends AppModel {
>
>         var $name = 'User';
>
>      var $validate = array(
>          'name'=>array('rule'=>'notEmpty'),
>          'email'=>array('rule'=>'email'),
>          'password'=>array(
>                   'Cannot be empty' => array('rule'=>'notEmpty'),
>                 'Must be at least 4 chars' => array('rule'=>array
> ('minLength', 4))
>          )
>        );
>  }
> This is my model and i saved as a user.php
> and my controller is
>   class UsersController extends AppController {
>
>     var $name = 'Users';
>     var $components = array('Security');
>
>     function add() {
>          if(!empty($this->data)) {
>             $this->User->save($this->data);
>         }
>       }
>  }
>
> and then i create a view for add action
>     echo $form->create();
>     echo $form->inputs(array('name', 'email', 'password'));
>     echo $form->end('Register');
> but it is creating error can anybody tell me why it is creating a
> error please correct it
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to