The show if statement use a query of DAL , then I think that it's perfectly
possible.
But the fields that use show_if , generally are used in a SQLFORM() , and
he verify if that field it's readable to SQLFORM.
Em domingo, 24 de julho de 2016 19:32:43 UTC-3, Sneka R escreveu:
>
> Can I use show_if for 2 tables?
> For example:
> db.table2.field.show_if = (db.table1.box==True)
>
> To be more clear:
> Model:
> db.define_table(’table1’,
> Field('title’,label=‘Workshop title
> :',requires=IS_NOT_EMPTY()),
> Field(’help1’,’boolean’,label=’Need help?’))
>
>
> db.define_table(’table2',
> Field(’title', 'reference table1',label='Workshop title
> :'),
> Field(‘help2’,’boolean’, label=’Need help?'))
>
> Controller:
> def register_workshop():
> workshop = db.table1(request.args(0))
> db.table2.help2.show_if = (db.table1.help1==True)
>
--
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].
For more options, visit https://groups.google.com/d/optout.