list:reference field number of entries

55 views
Skip to first unread message

BlueShadow

unread,
Apr 23, 2014, 3:18:32 PM4/23/14
to web...@googlegroups.com
Hi,
I got a list:reference field where there are very many entries to choose from and the default field shows only 5 entries is there a way to increase that number or get a better field to select multiple entries?
thanks for your help

Richard Vézina

unread,
Apr 23, 2014, 3:28:59 PM4/23/14
to web2py-users
Use a jquery multiselect plugin... Or set a size to the select :

<select size="10" multiple>

With _size='10' maybe...

Richard


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

Niphlod

unread,
Apr 23, 2014, 3:40:48 PM4/23/14
to web...@googlegroups.com
this should work

db.table.field.widget = lambda field,value: SQLFORM.widgets.multiple.widget(field,value,size=10)


BlueShadow

unread,
Apr 23, 2014, 5:15:34 PM4/23/14
to web...@googlegroups.com
Thanks Niphlod yours works.
Richard can you tell me how one can implement the jquery multiple select plugin.
I tried a fancy one some time ago which had two windows one showing the selected and one showing the unselected. but I could never get it to work.

Richard Vézina

unread,
Apr 24, 2014, 10:15:10 AM4/24/14
to web2py-users
This one is old don't know if still work : http://www.web2pyslices.com/slice/show/1395/jquery-multi-select-widget

This is another option :

Here another with bootstrap :


You have to work your way to make it works.

Richard




Reply all
Reply to author
Forward
0 new messages