two forms in one view Login,Register
the register :
<?php echo $this->Form->create('User',array('class'=>'box','action'=>'register')); ?>
the login :
<?php echo $this->Form->create('User',array('class'=>'box','action'=>'login')); ?>
The code is written in the Login view , and i'm using custom validation , the login works perfectly because I'm in the Login view (i guess) , But when i submit the Register Form it takes me away to another page : /users/register how can i stop that.
Secondly , since both of the Forms have username and password fields they are affecting each other , I mean when I write a wrong username and password , they don't disappear after validation and that's ok but they appears also in the register Form , and that's not !