thxs, same problem. it has worked for me Em segunda-feira, 4 de março de 2013 10:34:14 UTC-3, Anthony escreveu: > > db.category.parent.requires = IS_EMPTY_OR(IS_IN_DB(db, 'category.category' > )) > > On Sunday, March 3, 2013 9:34:59 PM UTC-5, 黄祥 wrote: >> >> a, thank you so much for your detail explaination anthony. it's work fine >> now by add : >> >> db.category.parent.requires=IS_IN_DB(db, 'category.category') >> >> btw, with this, i still have a problem for input the parent category. >> because in form there is not allowed to put an empty value. i have 2 ideas >> for this problem : >> 1. put the parent category directly to database via database input command >> 2. create the root category above parent category : >> for example >> root category >> | >> parent category >> | >> child category >> >> do you have better idea or suggestion about this? >> >> thanks a lot before >> >
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/e127fa6a-e03a-45c7-aa02-f651970e912f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

