Hello!
How can I fill a drop box widget with content depends of another drop
box? I'll explain better: I have 3 tables:
db.define_table('categoria',
SQLField('nombre', notnull=True),
format='%(nombre)s')
db.define_table('subcategoria',
SQLField('categoria',db.categoria, label="Categoría"),
SQLField('nombre'),
format='%(nombre)s')
db.define_table('empresa',
SQLField('categoria',db.categoria, label="Categoría"),
SQLField('subcategoria', db.subcategoria,
label="Subcategoría"),
SQLField('nombre'),
SQLField('contenido','text'),
format='%(nombre)s')
db.categoria.nombre.requires=[IS_NOT_EMPTY(), IS_NOT_IN_DB(db,
db.categoria.nombre)]
db.subcategoria.nombre.requires=[IS_NOT_EMPTY(), IS_NOT_IN_DB(db,
db.subcategoria.nombre)]
db.empresa.nombre.requires=[IS_NOT_EMPTY(), IS_NOT_IN_DB(db,
db.empresa.nombre)]
One categoria may have many subcategorias, and I'd like the contents
of subcategorias change depending of the content of categoria,
Somebody has any suggestion to do this?
Thanks in advanced