Try http://code.google.com/appengine/docs/python/tools/webapp/requestclass.html#Request_get_all
On Jun 4, 5:57 pm, NealWalters <nealwalt...@nealwalters.com> wrote: > Is it possible to pass a list or array of checkbox values from a > webpage to Python? > > For example - give all fields the same name like this: > > English:<input type="checkbox" name="language" value="English" /><br/> > Spanish:<input type="checkbox" name="language" value="Spanish" /><br/> > Portuguese: <input type="checkbox" name="language" value="Portuguese" / > > ><br/> > > Or am I going to have give every checkbox a different name and write > more code? > > I'd like to do something like this: > languages = self.request.get('language') > self.response.out.write("size=" + str(len(languages)) + "<BR>") > for language in languages: > self.response.out.write("language=" + language + "<br/>") > return > > and even persist the languages in BigTable as a single list field. > > The above seems to be returning the first item with a value, then > enumerating the letters of that language: > size=10 > language=P > language=o > language=r > language=t > language=u > language=g > language=u > language=e > language=s > language=e > > What I would like to see is (if these two languages were checked): > size=2 > language=English > language=Portuguese > > Thanks, > Neal Walters --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---