dropdown: db.detail.master.requires=IS_IN_DB(db, db.master.id, '%(name)s')
validation but no dropdown: db.detail.master.requires=[IS_IN_DB(db, db.master.id, '%(name)s')] On Feb 19, 1:45 pm, jbarciela jbarciela <[email protected]> wrote: > Hello all, > > This is a n00b question, any help greatly appreciated. > > I have this simple model (see below) and I'm expecting to see a > dropdown for the "master" field when I insert a new detail in the db > admin application, but all I get is a simple textbox. > What is it that I'm doing wrong? I'm not seeing it. > > db.define_table('master', > SQLField('name', 'string')) > > db.define_table('detail', > SQLField('name', 'string'), > SQLField('master', db.master)) > > db.master.name.requires=[IS_NOT_EMPTY(), IS_NOT_IN_DB(db, 'master.name')] > db.detail.name.requires=[IS_NOT_EMPTY(), IS_NOT_IN_DB(db, 'detail.name')] > db.detail.master.requires=[IS_IN_DB(db, db.master.id, '%(name)s')] > > Thanks > Jaime --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

