I am trying to program the ability to create a new record that defaults to a copy of an existing record. The records include an image that I would also like to use but can't seem to figure out how to pass it in to the SQLFORM.
For editing records, I do this which works fine: form = SQLFORM(db.item, item, upload=(URL('static', 'uploads'))) For the other input fields, i'm just doing something simple like this: form.vars.title = ref_item.title I'd like to do something like: form.vars.image = ref_item.image Or something like this (without "item" since it's a new record): form = SQLFORM(db.item, upload=(URL('static', 'uploads'))) Also, I have a compute field to generate a thumbnail. Has anyone done anything like this?