did you try
echo $this->Form->create('User', array('action'=>'login'));
On 6 Feb., 15:49, swedek <dennis.a...@xxxxxxxxx> wrote:
> What I'm trying to achieve is enabling my login form from a header.
> When a user visits my site, they get redirected to / if they try to view
> anything else while not being logged in. They can then either go to
> /Users/login and login in, or log in from the header (this form is
> controlled from a layout).
> However, the header login form action just points to /, instead of
> /Users/login. The code used can be seen below.
> echo $this->Form->create('User');
> echo $this->Form->input('username', array('label' => 'Användarnamn',
> 'controller' => 'users', 'action' => 'login'));
> echo $this->Form->input('password', array('label' => 'Lösenord'));
> echo $this->Form->end('Logga in');
> The rendered result is as following
> <form action="/" id="UserDisplayForm" method="post"
> How do I get the form to submit to /Users/login?
> View this message in
> Sent from the CakePHP mailing list archive at Nabble.com.
Our newest site for the community: CakePHP Video Tutorials
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
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at