multiple=True in IS_IN_SET() validator should help...

Richard

On Thu, Jan 14, 2016 at 11:57 AM, Ron Chatterjee <achatterjee...@gmail.com>
wrote:

> Where in the book I find this info?
>
>
> On Thursday, January 14, 2016 at 11:56:51 AM UTC-5, Ron Chatterjee wrote:
>>
>> Here is an example in picture.
>>
>>
>>
>> On Wednesday, January 13, 2016 at 4:23:11 PM UTC-5, Ron Chatterjee wrote:
>>>
>>> *Model:*
>>>
>>> db.define_table('mytable',
>>>                 Field('name', type='list:string',requires=IS_IN_SET
>>> (('True','False')),
>>>                       widget=SQLFORM.widgets.checkboxes.widget))
>>>
>>>
>>> *Controller:*
>>>
>>>
>>> def index():
>>>     variables = []
>>>     form = SQLFORM(db.mytable).process()
>>>     if form.accepted:
>>>         #comments from that particular blog post
>>>         variables = form.vars.name
>>>     return dict(form = form,variables = variables )
>>>
>>>
>>> *View:*
>>>
>>> {{extend 'layout.html'}}
>>> {{=form}}
>>> {{=variables}}
>>>
>>>
>>>
>>> I can only output true or false. I want to select and output True and
>>> False both. How?
>>>
>>>
>>> --
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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

Reply via email to