Thanks Massimo. Quick question, how do I get this patch? (url address) Also, can I update this patch into my current version of web2py (1.56.4) or do I need to do a full upgrade?
-Sebastian On Jun 10, 10:31 pm, mdipierro <[email protected]> wrote: > You are correct. I fixed it and I am uploading to trunk now (launchpad > 904). > > Massimo > > On Jun 10, 5:52 pm, DJ <[email protected]> wrote: > > > Hello, > > > I see a strange behavior when I try to validate a FORM. If there is a > > required field that is left empty Web2PY throws a "Cannot be empty" > > error message (good behavior). But along with this, the checkbox > > fields in the form also get selected even though they were left > > unchecked (unwanted action). > > > I suspect this may be a bug during form validation. Any ideas on how > > to get around this? Thanks for your help. > > > -Sebastian > > > Web2py: 1.56.4 > > > -----Code fragment ------ > > # db().select(db.resist.ALL) = 'test1', 'test2', 'test3', 'test4' ## > > from DB > > resist_mult = ['test2', 'test3'] > > > form=FORM(TABLE( > > TR(TD("Name:",_class="right"),INPUT(_type="text", > > _size="", _name="name", value=str(a.name)+".1", requires=[IS_NOT_EMPTY > > (), IS_NOT_IN_DB(db, 'project.name')]), > > TD("Notebook:",_class="right"),INPUT > > (_type="text",_name="notebook",_size="8", requires=IS_NOT_EMPTY()), > > TD("Page:",_class="right"),INPUT > > (_type="text",_size="5",_name="page", requires=IS_NOT_EMPTY()), > > > #BR(), > > > TABLE( > > TR("Resistances:", *[TD(x.name, INPUT(_type="checkbox", > > name="resist_mult",_value=x.name, value=x.name in a.resist_mult)) for > > x in db().select(db.resist.ALL)]), > > > ) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

