say you have two tables
db.define_table('table1',SQLField('name'))
db.define_table('table2',SQLField('name'))
and you want table2.name to be a dropdown with values in table1.name
db.table2.name.requires=IS_IN_DB(db,'table1.name','%(name)s')
Massimo
On Oct 25, 7:02 pm, lev krasner <[EMAIL PROTECTED]> wrote:
> Massimo,
>
> What is the best way to create a drop down field on a form with the
> values in the drop down derived from a database field?
>
> Thanks,
> lev
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---