something like this?
form.append(BUTTON('click me',_onclick='document.location="%s"' % URL
(f='index')))
You may want to play with
form[0].append(...)
form[0][0].append(...)
form[0].insert(-1,....)
etc.
depending on where you want to insert the button.
On Jul 23, 4:43 pm, "Sebastian E. Ovide" <[email protected]>
wrote:
> Hi All,
>
> I need to add a Cancel botton the some auth form (change password and
> retrieve password). Clicking on the cancel button the form should redirect
> to a given URL.
>
> Do I need to create a new form in my controller ?
>
> Is there any easier way to do it ? (for example altering the form created by
> auth)
>
> def retrieve_password():
> form=auth.retrieve_password()
> # ADD CANCEL BUTTON HERE THAT REDIRECTS TO SOME URL IN SOME WAY
> #...
> return dict(form=form)
>
> thanks
>
> --
>
> Sebastian E. Ovide
>
> Sent from Dublin, Ireland
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---