>
>     Field('billing_country', requires=IS_EMPTY_OR(IS_IN_DB(db,
> db.country.id,'%(name)s')))


 Field('billing_country', 'reference country',
       requires=IS_EMPTY_OR(IS_IN_DB(db, db.country.id, '%(name)s')),
       represent=lambda id, r: db.country[id].name if id else "")

If you set your own validator for a reference field, you also have to set 
your own "represent" attribute. See 
here<https://groups.google.com/forum/#!msg/web2py/sq8d8M9ElZ8/rBpYl4Ax9okJ>for 
more details.

Anthony

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to