Hey all, I'm trying to implement two check boxes where the first is checked
by default, but both or only the second are acceptable checked patterns (at
least one must be checked).
In my controller I have the following:
MY_OPTIONS = ['In-service view','Future view' ]
form = SQLFORM.factory(Field('search',requires=IS_NOT_EMPTY()),
Field('view', "list:string",
default=MY_OPTIONS[0],
widget=SQLFORM.widgets.checkboxes.widget,
requires=[IS_IN_SET(MY_OPTIONS, multiple=True),IS_NOT_EMPTY()])).process()
If I do a print request.vars.search I see the value entered in my search
field, as expected. However, when I do a print request.vars.view, I get a
"None". I'm totally lost with the widgets. Any insight would be greatly
appreciated.
LSC
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.