Re: [web2py] Adding a copy option to a SQLFORM.grid

2012-04-12 Thread Mike Veltman
ok I used this in the end :) links = [lambda row: A('Copy',_href=URL("formdb","copy_profile",args=[row.id]))] @auth.requires_login() def copy_profile(): record = db.lparprofile(request.args[0]) vals = {} for k,v in record.items(): if k in db.lparprofile.fields:

Re: [web2py] Adding a copy option to a SQLFORM.grid

2012-04-12 Thread Mike Veltman
On 04/12/2012 01:08 PM, Mike Veltman wrote: Well I would like to have besides edit delete etc in my SQLFORM.grid also a copy option that copies the record and then gives me the edit so I can modify it. Anyone a idea how to do that ? Mike Aha I have to use links (RTFM) Does anybody have a ex

[web2py] Adding a copy option to a SQLFORM.grid

2012-04-11 Thread Mike Veltman
Well I would like to have besides edit delete etc in my SQLFORM.grid also a copy option that copies the record and then gives me the edit so I can modify it. Anyone a idea how to do that ? Mike