I had to figure (remember my read) out how to call the id in my other
function, but I got it to work.
Here is my working functions :
def atable_create():
if auth.has_membership(auth.id_group('group1')):
form=crud.create(db.atable,next='atable_read/[id]',message=T('form
accepted'))
elif form.errors:
response.flash = T('form has errors')
else:
response.flash = T('please fill out the form')
return dict(form=form)
def atable_read():
form=crud.read(db.atable,request.args[0])
return dict(form=form)
Thank you...
Jonhy
On 2010-06-30 16:58, mdipierro wrote:
it is in form.vars.id. You can also use a shotcut:
form=crud.create(db.atable,next='atable_read/[id]')
On 30 Giu, 15:52, Jean-Guy<jean...@gmail.com> wrote:
Hello,
How may I pass the id of my entered record to an other function??
def atable_create():
if auth.has_membership(auth.id_group('group1')):
form=crud.create(db.atable,next=URL(r=request,f='atable_read'),message=T('form
accepted'))
elif form.errors:
response.flash = T('form has errors')
else:
response.flash = T('please fill out the form')
return dict(form=form)
def atable_read(...):
form=crud.read(db.atable,4)
return dict(form=form)
Thanks
Jonhy