Hi Massimo,
I tried below, it could populate database values into the UPDATE FORM and
updated the 2 tables correctly, not sure if it's the best way to do it. Any
comment is appreciated, thanks again!
item_id = request.args(0)
item_row = db.item(item_id)
quote_row = db.quotation(item
Hi Massimo,
Thanks for your help, i indeed used
db.item.insert(**db.item._filter_fields(form.vars)) and
db.subscription_item.insert(**db.subscription_item._filter_fields(form.vars))
to generate a CREATE FORM in a separate action. Now I want to create
another action with an UPDATE FORM for user
You can do form = SQLFORM.factory(db.item, db.subscription_item) as long
the two tables do not have fields with the same name. Then after
if form.process().accepted:
db.item.insert()
db.subscription_item.insert()
where ... should be replaced by the proper fields in form.vars
On
3 matches
Mail list logo