Re: [fw-general] Login Form

2008-07-10 Thread Christian Sanchez
Well I have a LoginForm.php and then call it to insert it on the view, so
I'm using:

setName('loginForm');
$this->setAction('/index/login/');
$this->setMethod('post');

Is there a way to use it in this case... The LoginForm.php instead of using
it in the view?

2008/7/10 Rob Allen <[EMAIL PROTECTED]>:

>
> On 11 Jul 2008, at 02:15, Christian Sanchez wrote:
>
> I have created a Login form based on various tutorials including
> Matthew's... But I get this bug I can't quite get how to get around...
>
> I have set the action in the form like this:
> $this->setAction('index/login/');
> But when I'm testing the actual login and after 3 times of getting the
> errors I'm testing for I get the url like this:
> http://localhost/index/login/index/login/index/login
> That means everytime I hit the log in submit button index/login adds to the
> current url, is there a way to set the action to not do this?
>
> Just to keep the URL clean though... But I've been wondering this for weeks
> now :P
>
> --
> Christian Sánchez A.
>
>
>
> Assuming that $form exists in the model, then you can do this:
>
> $url = $this->_helper->url->url(array('controller'=>'index',
> 'action'=>'login'));
> $form->setAction($url);
>
>
> Regards,
>
> Rob...
>



-- 
Christian Sánchez A.


Re: [fw-general] Login Form

2008-07-10 Thread Rob Allen


On 11 Jul 2008, at 02:15, Christian Sanchez wrote:

I have created a Login form based on various tutorials including  
Matthew's... But I get this bug I can't quite get how to get around...


I have set the action in the form like this: $this->setAction('index/ 
login/');
But when I'm testing the actual login and after 3 times of getting  
the errors I'm testing for I get the url like this: http://localhost/index/login/index/login/index/login
That means everytime I hit the log in submit button index/login adds  
to the current url, is there a way to set the action to not do this?


Just to keep the URL clean though... But I've been wondering this  
for weeks now :P


--
Christian Sánchez A.



Assuming that $form exists in the model, then you can do this:

$url = $this->_helper->url->url(array('controller'=>'index',  
'action'=>'login'));

$form->setAction($url);


Regards,

Rob...

Re: [fw-general] Login Form

2008-07-10 Thread Christian Sanchez
didn't work either :(

2008/7/10 Christoph Dorn <[EMAIL PROTECTED]>:

> Try using:
>
> http://localhost/project/html/"; />
>
> in your HTML page and this:
>
> $this->setAction('index/login/');
>
> for your action.
>
> Christoph
>
>
>
>
> Christian Sanchez wrote:
> > I tried that, but my local URL is not really localhost... it's:
> > http://localhost/project/html/index/login/
> >
> > Is there any way to parse the baseURL to the Action in the form?
> >
> >
> >
> > 2008/7/10 Christoph Dorn <[EMAIL PROTECTED]
> > >:
> >
> > Try: $this->setAction('/index/login/');
> >
> > You need the extra "/" at the beginning of the relative URL to make
> it
> > relative to your domain and not the current page.
> >
> > Christoph
> >
> >
> >
> > Christian Sanchez wrote:
> > > I have created a Login form based on various tutorials including
> > > Matthew's... But I get this bug I can't quite get how to get
> around...
> > >
> > > I have set the action in the form like this:
> > > $this->setAction('index/login/');
> > > But when I'm testing the actual login and after 3 times of getting
> the
> > > errors I'm testing for I get the url like this:
> > > http://localhost/index/login/index/login/index/login
> > > That means everytime I hit the log in submit button index/login
> > adds to
> > > the current url, is there a way to set the action to not do this?
> > >
> > > Just to keep the URL clean though... But I've been wondering this
> for
> > > weeks now :P
> > >
> > > --
> > > Christian Sánchez A.
> >
> >
> >
> >
> > --
> > Christian Sánchez A.
>
>


-- 
Christian Sánchez A.


Re: [fw-general] Login Form

2008-07-10 Thread Christoph Dorn
Try using:

http://localhost/project/html/"; />

in your HTML page and this:

$this->setAction('index/login/');

for your action.

Christoph




Christian Sanchez wrote:
> I tried that, but my local URL is not really localhost... it's:
> http://localhost/project/html/index/login/
> 
> Is there any way to parse the baseURL to the Action in the form?
> 
> 
> 
> 2008/7/10 Christoph Dorn <[EMAIL PROTECTED]
> >:
> 
> Try: $this->setAction('/index/login/');
> 
> You need the extra "/" at the beginning of the relative URL to make it
> relative to your domain and not the current page.
> 
> Christoph
> 
> 
> 
> Christian Sanchez wrote:
> > I have created a Login form based on various tutorials including
> > Matthew's... But I get this bug I can't quite get how to get around...
> >
> > I have set the action in the form like this:
> > $this->setAction('index/login/');
> > But when I'm testing the actual login and after 3 times of getting the
> > errors I'm testing for I get the url like this:
> > http://localhost/index/login/index/login/index/login
> > That means everytime I hit the log in submit button index/login
> adds to
> > the current url, is there a way to set the action to not do this?
> >
> > Just to keep the URL clean though... But I've been wondering this for
> > weeks now :P
> >
> > --
> > Christian Sánchez A.
> 
> 
> 
> 
> -- 
> Christian Sánchez A.



Re: [fw-general] Login Form

2008-07-10 Thread Christian Sanchez
I tried that, but my local URL is not really localhost... it's:
http://localhost/project/html/index/login/

Is there any way to parse the baseURL to the Action in the form?



2008/7/10 Christoph Dorn <[EMAIL PROTECTED]>:

> Try: $this->setAction('/index/login/');
>
> You need the extra "/" at the beginning of the relative URL to make it
> relative to your domain and not the current page.
>
> Christoph
>
>
>
> Christian Sanchez wrote:
> > I have created a Login form based on various tutorials including
> > Matthew's... But I get this bug I can't quite get how to get around...
> >
> > I have set the action in the form like this:
> > $this->setAction('index/login/');
> > But when I'm testing the actual login and after 3 times of getting the
> > errors I'm testing for I get the url like this:
> > http://localhost/index/login/index/login/index/login
> > That means everytime I hit the log in submit button index/login adds to
> > the current url, is there a way to set the action to not do this?
> >
> > Just to keep the URL clean though... But I've been wondering this for
> > weeks now :P
> >
> > --
> > Christian Sánchez A.
>
>


-- 
Christian Sánchez A.


Re: [fw-general] Login Form

2008-07-10 Thread Christoph Dorn
Try: $this->setAction('/index/login/');

You need the extra "/" at the beginning of the relative URL to make it
relative to your domain and not the current page.

Christoph



Christian Sanchez wrote:
> I have created a Login form based on various tutorials including
> Matthew's... But I get this bug I can't quite get how to get around...
> 
> I have set the action in the form like this:
> $this->setAction('index/login/');
> But when I'm testing the actual login and after 3 times of getting the
> errors I'm testing for I get the url like this:
> http://localhost/index/login/index/login/index/login
> That means everytime I hit the log in submit button index/login adds to
> the current url, is there a way to set the action to not do this?
> 
> Just to keep the URL clean though... But I've been wondering this for
> weeks now :P
> 
> -- 
> Christian Sánchez A.