Hello I am probably going about this wrong. 

But I am wondering if it is possible to do something like this with SQLFORM 
so I can pass on successful submission an update saying confirmed = False

@auth.requires_login()
def edit_listing():
    listing_id = request.args(0)
    query = db((db.listing.id == listing_id) & (db.listing.userinfo == 
auth.user.id)) 
    form = SQLFORM(query, formstyle='divs')
    if form.accepts(request,session):
        session.flash = 'You have successfully updated your listing'
        return redirect(URL('user_control', 'listing'))
    elif form.errors:
        session.flash = 'Please correct the highlighted fields'
        return dict(form=form)
    else:
        return dict(form=form)
    return dict(form=form)

*cheers and thank you for the help

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to