oops I forgot to add the "hidden=dict(idToEdit=idToEdit) "
code edited below :

if idToEdit :
        record = db(db.langResource.id==idToEdit)
        sqlForm = SQLFORM(db.langResource, record,
hidden=dict(idToEdit=idToEdit))    # update existing
    else :
        sqlForm = SQLFORM(db.langResource, hidden=dict(idToEdit=None))   #
create new
    if sqlForm.process().accepted:
        response.flash = 'New resource added.'
    elif sqlForm.process().accepted:
        response.flash = 'Resource modified.'
    elif sqlForm.errors:
        response.flash = 'Form has errors.'
    else:
       response.flash = 'Please fill out the form.'
    return sqlForm

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to