Reputation: 13525
I found an article for CherryPy and some articles on how to do this with Javascript, but is there a way to collect values from checkbox with webapp
? Thanks.
My naive attempt to append the <...name="article_tag"...>
from the form to a list fails because it only writes the first checked item (in this case "sputnik"):
K = []
for i in range(1,5):
K.append(self.request.get("article_tag"))
self.response.out.write(K)
logging.info("""*****K %s""" % K)
logging.info:
*****K [u'sputnik', u'sputnik', u'sputnik', u'sputnik']
Upvotes: 1
Views: 1173
Reputation: 13525
I found the answer: http://code.google.com/appengine/docs/python/tools/webapp/requestclass.html#Request_get_all
K = self.request.get_all("article_tag")
Upvotes: 2