I'm trying my first application in web2py. I've this model
db.define_table('Person', Field('name'), format='%(name)s') db.define_table('Relation', Field('name',db.Person), ('contact',db.Person)) db.Relation.name.widget=SQLFORM.widgets.autocomplete(request,db.Person,id_field=db.Person.id) db.Relation.contact.widget=SQLFORM.widgets.autocomplete(request,db.Person,id_field=db.Person.id) When i try to insert a new record in Relation from appadmin i can't do for type mismatch, the form post db.Person.name value, not db.Person.id as i expected ... I use web2py 2.3.2 for win. any suggestions??? --