Yes, here is how db.category.parent.requires=IS_NULL_OR(IS_IN_DB (db,'category.id','% (title)s'))
On May 18, 9:39 am, James Booker <[email protected]> wrote: > Suppose I have this table defined: > > db.define_table('category', > SQLField('title'), > SQLField('parent','reference category')) > db.category.parent.requires=IS_NULL_OR(IS_IN_DB (db,'category.id','% > (id)s')) > > And I then use the administrative interface to insert a new row into > the database, the 'category' field only contains the id numbers of > existing categories. I would like the combobox that's created to show > the 'title' field but use the 'id' field (as indeed it should) > > Is there an easy way to make this automatic (like in cakephp) or do I > have to create some code in a controller function to do it? > > Thanks > James --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

