I have it like this:
db.define_table('mytable', Field('name', type='list:string',requires=IS_IN_SET (('True','False', 'Neither'), multiple=True), widget=lambda field, value: SQLFORM.widgets.checkboxes.widget(field, value, style='divs', label=True))) That gives me vertical placement. But you are right. That's the way to do it. On Thursday, January 14, 2016 at 1:40:25 PM UTC-5, Richard wrote: > > Looks about style parameters of SQLFORM.widget.checkbox there is > information about that if I remember... There is also _style attribute > where you can use 'divs'. Make sure you read about both attributes they are > differents and serve differents purposes... > > But with _style='divs' you should be able to displays everythings at you > which with CSS... > > Richard > > On Thu, Jan 14, 2016 at 1:23 PM, Ron Chatterjee <achatte...@gmail.com > <javascript:>> wrote: > >> It does! Thank you Richard. Do you happen to know if I want to display >> the checkbox horizontally as oppose to vertically, how would I do that? I >> asked cuz if I have a table with other fields and I have 10 checkboxes to >> say, it will be better to present them horizontally than vertically. >> Regardless, thanks for your time on this. Appreciated. >> >> >> >> On Thursday, January 14, 2016 at 12:33:52 PM UTC-5, Richard wrote: >>> >>> multiple=True in IS_IN_SET() validator should help... >>> >>> Richard >>> >>> On Thu, Jan 14, 2016 at 11:57 AM, Ron Chatterjee <achatte...@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+un...@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+un...@googlegroups.com <javascript:>. >> 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.