Something like this?

db.define_table('cities',
    Field('name'),
    Field('state'),
    format = '%(name)s'
)


form = SQLFORM.factory(Field('choose_city','reference cities'))

On Feb 1, 2:25 pm, shartha <m.mirghorb...@gmail.com> wrote:
> So the problem is two folds. I have defined a simple table as in:
>
> db = DAL("sqlite://storage.sqlite")
>
> db.define_table('cities',
>     Field('name'),
>     Field('state'),
> )
>
> Now I'd like to have a drop-down list in my view that reads from the
> name filed of the database cities. How can I achieve this? Any help
> would be highly appreciated.
>
> Thanks!
> S.

Reply via email to