Hi all, I've been doing some tests on form.py with a multiple choice dropdown.
I based my tests on form.py tutorial (http://webpy.org/form), and modified the example as follows --- test.orig.py 2007-08-06 22:50:03.000000000 +0200 +++ test.py 2007-08-06 22:48:31.000000000 +0200 @@ -13,7 +13,10 @@ form.Validator('Must be more than 5', lambda x:int(x)>5)), form.Textarea('moe'), form.Checkbox('curly'), - form.Dropdown('french', ['mustard', 'fries', 'wine'])) + form.Dropdown('french', + ['mustard', 'fries', 'wine', 'fromage'], + form.notnull, + **{'multiple': None, 'size': 3})) class index: def GET(self): @@ -28,7 +31,7 @@ else: # form.d.boe and form['boe'].value are equivalent ways of # extracting the validated arguments from the form. - print "Grrreat success! boe: %s, bax: %s" % (form.d.boe, form['bax'].value) + print "Grrreat success! french: %s, bax: %s" % (form['french'].value, form['bax'].value) if __name__=="__main__": web.internalerror = web.debugerror The problem is that if I select more than one 'french', it only displays one of them, ie Grrreat success! french: wine, bax: 7 Is it a known problem? I coulnd't find any bugs about it in launchpad and I couldn't find an answer myself. Thanks, Matteo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
