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
>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to