No this does not work:
...requires=[IS_IN_SET(...), IS_NOT_EMPTY(), ...]
Here the widget is added manually:
db.define_table('info',
Field('info_number', 'integer', label='Info Number'),
Field('description', 'text'),
Field('environment', widget=SQLFORM.widgets.checkboxes.widget),
I don't know if I am jumping the gun here, but DenesL your widget
example appears to test for 0, albeit it's not presented in the
checkbox form, but it does seem to require 1 or more environments to
be selected.
(= ♥
On Oct 1, 12:10 pm, DenesL denes1...@yahoo.ca wrote:
On Sep 30, 8:39 pm,
Nope lies... I did jump the gun (I need to work on my giddiness .)
On Oct 3, 11:00 am, jkral jk...@gogoair.com wrote:
I don't know if I am jumping the gun here, but DenesL your widget
example appears to test for 0, albeit it's not presented in the
checkbox form, but it does seem to require
/09/2011 15:23, jkral jk...@gogoair.com escreveu:
I am having some troubles getting my form to error when no items are
selected in the environment field.
Could someone please shed some insight? and I apologize in advance if
this request is redundant.
from specific module import
...@yahoo.ca wrote:
Hi jkral,
http://web2py.com/book/default/chapter/07#Validators
under IS_IN_SET and Tagging
Note that when multiple=True, IS_IN_SET will accept zero or more
values, i.e. it will accept the field when nothing has been selected.
so you have to check for an empty selection
form=SQLFORM(db.info_info, fields = ['info_number', 'environment',
'description', 'notice',])
On Sep 29, 8:58 pm, Bruno Rocha rochacbr...@gmail.com wrote:
How are you creating the form?
Crud, form, sqlform, custom or html?
http://zerp.ly/rochacbruno
Em 29/09/2011 15:23, jkral jk
, September 30, 2011 1:23:35 PM UTC-4, jkral wrote:
Thanks DenesL, and yes I knew that multiple=True accepted 0 or more,
I just wasn't sure if there was another validator that I could use in
conjunction with IS_IN_SET(multiple=True)
So then I have to create my own check, there's not quick
I appreciate all of the input thanks. I'm pretty new to python and
web2py (I really like them!)and pretty much any development in
general. And forums are not always filled with kind souls
I am having some troubles getting my form to error when no items are
selected in the environment field.
Could someone please shed some insight? and I apologize in advance if
this request is redundant.
from specific module import ENVIRONMENTS
##ENVIRONMENTS is a tuple
db.define_table('info',
9 matches
Mail list logo