The new record id will be in form.vars.id after the accepts.
On Mar 26, 7:46 pm, Brian Will <[email protected]> wrote: > When using SQLFORM, I'd like to get the default/computed values of > fields not included in the form. Can I do this without making another > query? Can I get, say, the autogen'd id of the new record? For > example: > > form = SQLFORM(db.job_post, submit_button='Post Job', > formstyle='table2cols', > fields=['poster_name', 'poster_email', 'poster_phone', > 'zipcode', 'location_description', 'job_type', 'job_title', > 'job_description'], > _id='postjob' > ) > if form.accepts(request.vars, session): > # ... > > I want the 'id' and 'uuid' field values created when this form > accepts. To be honest, I'm not even sure how to do this with a query > except by matching on all provided fields (because none of the other > fields are unique), and that just feels ugly. > > Should I have to resort to a manual FORM in this instance? > > Thanks.

