I have found the following method:
A(T('Forgot your password?'), _href='#', _onclick="document['%s'].submit()"
% (SIGNIN_FORM_ID)
The problem is that I can not specify another href (I *must* put '#',
otherwise it does not work).
And, since the form is submitted to the same function as if the normal
"submit" button was pressed, I am not able to distinguish between both
situations.
- How can I submit the form to another url, by using an A element?
- Or, in case that is not possible, how can I check which way the form
has been submitted?
Thanks,
Daniel
On Monday, September 10, 2012 10:03:12 AM UTC+2, Daniel Gonzalez wrote:
>
> Hi,
>
> I am preparing a customized log-in form. I want to add a link to recover
> the password, which is implemented with the A(..) element.
> In the controller function where I want to send an email, I need to access
> the email given by the user. I do that with request.vars.email.
> The problem is that, since the form was not submitted, the email is empty.
>
> How can I submit the form with an A() element?
> Please note that I *do not* want to have an extra button with "Lost
> Password" to submit the form. I really want it to be a link.
>
> Is this possible?
>
> Thanks,
> Daniel
>
--