Do you have a table db.city with a field db.city.name? If so, because db.address.city is not a reference, it should just be
db.address.city.widget=AutocompleteWidget(request,db.city.name) On May 21, 7:55 am, annet <annet.verm...@gmail.com> wrote: > Massimo, > > I gave this a try: > > from gluon.sqlhtml import AutocompleteWidget > > db.define_table('address', > Field('city',length=42,default='',notnull=True)), > ...) > > db.address.city.widget=AutocompleteWidget(request,db.city.name,db.city.name,orderby=db.city.name) > > but that doesn't work, why not? > > Kind regards, > > Annet.