How to add a record with crud.create with a hidden form field
(Orderid) and a value (taken from variable orderid within controller).
model:
db.define_table("workingtime",
Field("StartTime","datetime",default=datetime.datetime.today()),
Field("EndTime","datetime",default=""),
Field("Comment","string",default=""),
Field("Orderid","string",default="",readable=False),)
controller:
def addcatsdata():
orderid = request.args(0)
addcatstimeentry=crud.create(db.workingtime,next=URL(request.application,request.controller,'editjob'),message=T("enty
added"))
return dict(addcatstimeentry=addcatstimeentry)