db.define_table('cities',
Field('name', 'string'),
Field('state', db.states)
)
db.define_table('categories',
Field('name', 'string')
)
db.define_table('places',
Field('name', 'string', required=True),
Field('address1', 'string'),
Field('address2', 'string'),
Field('phone', 'string'),
Field('city',
widget=SQLFORM.widgets.autocomplete(request,
db.cities.name,
id_field=db.cities.id)),
Field('zip', 'integer'),
Field('category',
widget=SQLFORM.widgets.autocomplete(request,
db.categories.name,
id_field=db.categories.id)),
Field('web', 'string'),
Field('email', 'string'),
Field('description', 'string')
)
I havae this tables wit ha two fields with autocomplete, but only show
results for the firts field in both fields! I think the problem is in
javascript because only consult an first url, something with the html
inputs id maybe, the code is highly obfuscated so I have not been able
to review it.