hi, anthony, thank you so much for your kind attention, problem solved now def __add_2(table): form = crud.create(table, next = URL(request.application, request.controller, index_link), onaccept = *__update_table_2* ) return dict(form = form)
*def __update_table_2(form):* * if request.function == 'check_out_add':* * db.room(db.room.id == form.vars.room_id).update_record(status_id = 1)* * elif request.function == 'booking_add':* * db.room(db.room.id == form.vars.room_id).update_record(status_id = 2)* * elif request.function == 'check_in_add':* * db.room(db.room.id == form.vars.room_id).update_record(status_id = 3)* * * or maybe you have another way out for this situation? thank you very much. On Fri, Apr 22, 2011 at 6:16 PM, Anthony <abasta...@gmail.com> wrote: > On Friday, April 22, 2011 2:46:44 AM UTC-4, 黄祥 wrote: >> >> thank you so much for your pointer, bruno, it seems onaccept, can't >> receive request.vars that been passed during form submit, because when i >> tried to replace the request.vars into the value id (1, 2, etc), no errors >> occured. did anyone have meet the same problem? >> > > This isn't quite clear -- can you show your code? Did you try form.vars? > > Anthony >