How do I use lambda to retrieve the most recent id in conjunction with
the guestbook code below?

Would like to update my users table with a reference id to their
guestbook entry.

In order store the guestbook entry id, I need to have a reference
id.   I am not sure how to obtain this.

One idea would be to grab it at login and save as a session variable.
Please give me some insight.  The reference below has given me ideas,
but I seem to be unable to use it.

form=SQLFORM(db.guestbook,fields=['url','title','location'])
    form.vars.client_ip=request.env.remote_addr
    (latitude, longitude) = geocode(form.vars.location)
    form.vars.lat=latitude
    form.vars.lon=longitude
    if form.accepts(request.vars,session):
        session.flash=' Guest Book Completed.Now YOU are on the map! '
        redirect(URL(r=request,f='index',args=
[form.vars.filecabinet]))
    return dict(form=form)


Reference:

http://groups.google.com/group/web2py/browse_thread/thread/5e1f13df588860e8/25ffec1d99743b26?hl=en&ie=UTF-8&q=web2py+lambda+form+id+onaccept#25ffec1d99743b26


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to