Hello all,

while using the checkboxes widget I noticed that for style='ul' it 
generates a bunch of UL elements each with a single LI, instead of the 
single UL with a bunch of nested LI elements that I expected to see.

Changing the ul wrapper from (DIV, UL, LI) to (UL, LI, TAG[''] ) would 
solve the above issue but there is no easy way to supply your own style.

Some quick testing code follows (it does not seem to matter if the field 
type is a list or not but both cases are present):

ss='one two three four five'.split()
db.define_table('t1',
  Field('s1',requires=IS_EMPTY_OR(IS_IN_SET(ss,multiple=False,zero=None))),
  
Field('s2','list:string',requires=IS_EMPTY_OR(IS_IN_SET(ss,multiple=True,zero=None))))
db.t1.s1.widget=lambda f,v:SQLFORM.widgets.checkboxes.widget(f,v,style='ul')
db.t1.s2.widget=lambda f,v:SQLFORM.widgets.checkboxes.widget(f,v,style='ul')
f=SQLFORM(db.t1)
print f

Comments?.

Regards,
Denes

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