I have 4 tables which I would like to create a form for.

As a test-case I have greatly simplified them and only included two:

db.define_table('product',
    Field('name','string'),
    Field('category','string')
)

db.define_table('product_list',
    Field('product_id', 'list:reference db.product'),
    Field('category', 'string')
)

db.product_list.product_id.requires = IS_IN_DB(db, db.product.id, '%(name)s'
, multiple=True)

The form should have:

   - an editable list allowing for modification of product_list and product
   - a read only html table showing the nesting
   - a create new product list form allowing you to not only create new 
   products for inclusion but also to choose other products for inclusion

How would I create this using the in-built crud library?

Thanks for all suggestions,

Alec Taylor

Reply via email to