Re: [web2py] SQLFORM inserts new record instead of updating existing record

2014-04-19 Thread Khalil KHAMLICHI
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.langResourc

Re: [web2py] SQLFORM inserts new record instead of updating existing record

2014-04-19 Thread Khalil KHAMLICHI
maybe something like this would work : if idToEdit : record = db(db.langResource.id==idToEdit) sqlForm = SQLFORM(db.langResource, record)# update existing else : sqlForm = SQLFORM(db.langResource) # create new if sqlForm.process().accepted: respons