I'm trying to build a custom form for my database and I made the following 
field in my model :

Field('security_ids',
>         'list:integer',
>         requires=IS_IN_SET(SECURITIES, multiple=True),
>         widget=lambda k,v: SQLFORM.widgets.checkboxes.widget(k, v, 
> style='ul', _class='checkbox-list'),
>         ),


When rendering the view, the scaffolding I expected from this helper was :

> <ul class="checkbox-list">
>     <li>
>         <input/>
>         <label/>
>     </li>
>     [...]
> </ul>


Instead, I got the following:

> <div class="checkbox-list">
>     <ul>
>         <li>
>             <input/>
>             <label/>
>         </li>
>     </ul>
>     [...]
> </div>


I really don't understand why web2py would build a succession of unordered 
lists instead of one unordered list containing multiple elements, which 
seems like the expected behavior.

How can I correct this ? Do I have to subclass a widget to create my own ?

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