Try:

crud.create(db.table,onvalidation=lambda form:
form.vars.field='value')

OR

db.table.field.default='value'
crud.create(db.table)



On Feb 17, 7:50 pm, Joe  Barnhart <joe.barnh...@gmail.com> wrote:
> I'm trying to use the new Crud features in 1.56 (coming from T2) but
> I'm having difficulty porting my application.  I need to create
> entries in a table that refer to the logged-in user.  Before, I just
> preset the id field to the id of the current user, but I don't see a
> way to do that with crud.create().  What am I missing?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to