How can I display the top level category name and group the entries that
are under it in my form that uses IS_IN_DB

For example the category field is top level

db.define_table('category',
    Field('userinfo',db.auth_user,default=auth.user_id,
writable=False,readable=False),
    Field('name', label='Sub Category', requires=IS_NOT_EMPTY()),
    Field('description', 'text'))

I would like to use SQLForm and group each entry under its respective
category entry

db.define_table('listing',
    Field('userinfo',db.auth_user,default=auth.user_id,
writable=False,readable=False),
    Field('category', db.category, label='Category * ~can select
multiple~', requires=IS_IN_DB(db,db.category.id,'%(name)s',multiple=True)),

 *cheers

and ty

-- 



Reply via email to