Try:
<?php echo $this->Form->create('School', array('action' => 'login')); ?>
If your form is being called from the /schools/login action then just do
<?php echo $this->Form->create('School'); ?>
HTH
On 17 February 2011 12:52, Christophe <[email protected]> wrote:
> Hi there
>
> I'm working on an app where schools should able to login.
> I just read the cookbook and used the api to understand the component
> but i'm missing a link I believe.
>
> My controller 'school_controller' has an action 'login'.
> And I've set the userModel and fields.
> $this->Auth->userModel = 'School';
> $this->Auth->fields = array(
> 'username' => 'email1',
> 'password' => 'schoolcode'
> );
>
> My form looks like this:
> <?php echo $this->Form->create('school',
> array('controller'=>'school','action' => 'login'));?>
> <h2>School inlog</h2>
> <?php
> echo $form->input('email');
> echo $form->input('pass');
> ?>
> <?php echo $form->end('Submit');?>
>
> But when I look at my SC I see Cake created a form with an action
> action="/code/index.php/school/schools/login"
> The problem is that "schools" doesnt exists and I have no clue why
> Cake adds it. Is there someone that can explain this or give a
> refference to an article about this?
>
> Thanks
> Christophe
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>
--
Kind Regards
Stephen @ NinjaCoderMonkey
www.ninjacodermonkey.co.uk
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php