Hi! Am Donnerstag, 14. Januar 2016 21:04:25 UTC+1 schrieb Anthony: > > Looks like the way you were using it before wasn't supposed to work but > did due to a bug. The purpose of the "record" argument is to enable a > database record to be updated, and so it is expected that the record will > have an "id" field (or a set of fields serving as a primary key). It > appears you are instead using the "record" argument as a way of pre-filling > the form with a set of previously used values. In that case, you should add > a dummy "id" field to session.mydata (it shouldn't matter what value you > assign to it, as it doesn't refer to a real record). Alternatively, you > could use the values in session.mydata to set default values in the > SQLFORM.factory fields. > > Anthony > >> >> Thank you for your input on the matter. It never occured to me, that I was relying on a bug :) After checking back with the documentation, I came up with another possible alternative to your suggestion: my_form.vars.update(my_data).
Kind regards, Silvan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.