2009/7/20 David Zejda <[email protected]> > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > for > IS_NULL_OR(IS_IN_DB(db, 'table.id', 'table.name')) > SQLForm generates a combo with a None as a selectable value.
The third field in IN_IN_DB() is a string that describes the elements of the dropbox. Try something like this instead: IN_NULL_OR(IS_IN_DB(db, 'table.id', '%(name)s')) This will make the current names in db.table as choices in the dropbox. > > There is also a relatively new support for multiple fields: > IS_IN_DB(db, 'table.id', 'table.name', multiple=True) > It generates a simple multi-select widget. > > It would be nice to combine both functionalities to have a SQLForm > support for: > IS_NULL_OR(IS_IN_DB(db, 'table.id', 'table.name', multiple=True)) > I think, the easiest way would be to add None to the multi-select values. > > Thank you... > > With regards > David > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkpkrkIACgkQ3oCkkciamVEUCgCcDDvUNa3Y63ltbVVejtkw7N7L > LegAn1ek/u4E67MlHqj85RhVZu/Il8K9 > =CAlm > -----END PGP SIGNATURE----- > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" 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 -~----------~----~----~----~------~----~------~--~---

