How about:

def lost_password():
    try:
        form = auth.retrieve_password()
    except HTTP: ### i assume that form redirected only if email send to 
user 
        form = DIV('Please check your email, an email sent to you 
',INPUT(_type='button',_value='Close',_class='btn btn-primary', 
_onclick="$('#Modallogin').modal('hide');"))        
    return form

You do not need to use json since you are only returning a form in html 
which is a string.

Massimo

On Monday, 1 April 2013 02:56:11 UTC-5, yashar wrote:
>
>
> is this true that SQLFORMs redirected to _next value when SQLFORM is 
> accepted? so i did this:
>
> def lost_password():
>     from gluon.serializers import json
>     try:
>         form = auth.retrieve_password()
>     except: ### i assume that form redirected only if email send to user 
>         return json(dict(form=DIV('Please check your email, an email sent 
> to you ',INPUT(_type='button',_value='Close',_class='btn btn-primary', 
> _onclick="$('#Modallogin').modal('hide');"))))        
>     return json(dict(form=form))
>
> i checked that and it works, any idea?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to