Is this possible at all?
On Sunday, July 24, 2016 at 5:32:43 PM UTC-5, Sneka R wrote:
>
> 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.