See this previous post; it was a question I asked
https://groups.google.com/forum/#!searchin/web2py/checkboxes$20with$20is_in_set%7Csort:relevance/web2py/UtbNmh-DF30/XaEXUF6gCgAJ
what I appreciated from Jim Russell's reply is advice of storing the items 
in a list.  This option uses IS_IN_SET as opposed to IS_IN_DB; not sure if 
that is an option for your project.

On Wednesday, August 30, 2017 at 5:52:36 PM UTC-7, Alex Glaros wrote:
>
> How to make check boxes appear? Below allows user to select multiple 
> dropdown items only if they are contiguous. No checkboxes appear which 
> would allow user to select non-contiguous items.
>
> def select_tables_to_pick_object_of_a_role():
>  potential_role_types = db((db.ObjectType.object_type_table_name != None) 
> & (db.ObjectType.object_type_table_name !=''))._select(db.ObjectType.
> object_type_table_name) 
>  limited_choices = (db.ObjectType.object_type_table_name.belongs(
> potential_role_types))
>  form = SQLFORM.factory( 
>  Field('object_type_table_name', type='list:string', requires = IS_IN_DB(
> db(limited_choices), 'ObjectType.object_type_table_name', 
> '%(object_type_table_name)s', multiple=True, zero = T('choose one')), 
> widget=SQLFORM.widgets.multiple.widget))
>  if form.process().accepted: 
>  response.flash = form.vars.object_type_table_name
>
>
> Thanks,
>
> Alex Glaros
>

-- 
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.

Reply via email to