With the "divs" style, the parent element of the checkboxes is a CAT(), 
which doesn't produce an HTML element (and therefore can't take any HTML 
attributes, such as a class). Maybe try:

db.anuncio.equipamento.widget = \
    lambda field, value: DIV(SQLFORM.widgets.checkboxes.widget(field, 
value,style
='divs'), _class="span2")

Anthony

On Wednesday, April 24, 2013 11:50:28 AM UTC-4, Tito Garrido wrote:
>
> Hi Folks,
>
> I was reading:
> http://web2py.com/books/default/chapter/29/07?search=checkboxes#Widgets
>
> I am trying to implement some checkboxes with a specific class using DIVs:
> db.anuncio.equipamento.widget=lambda field,value: 
> SQLFORM.widgets.checkboxes.widget(field,value,_class="span2",style='divs')
>
> The style parameter works but the _class does not, how can I add class to 
> my divs?
>
> Regards,
>
> Tito
>
> -- 
>
> Linux User #387870
> .........____
> .... _/_õ|__|
> ..º[ .-.___.-._| . . . .
> .__( o)__( o).:_______ 
>

-- 

--- 
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/groups/opt_out.


Reply via email to