did you try echo $this->Form->create('User', array('action'=>'login'));
? On 6 Feb., 15:49, swedek <dennis.a...@gmail.com> 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" > accept-charset="utf-8">...</form> > > How do I get the form to submit to /Users/login? > > -- > View this message in > context:http://cakephp.1045679.n5.nabble.com/Can-t-get-form-to-post-data-tp54... > Sent from the CakePHP mailing list archive at Nabble.com. -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php