> > > In subscribe.py you should make sure that the essay variable that is > passed in is the same type (a list?) whether there is just one question or > many (I can't see where you construct that data structure -- where does > that happen?) > (in subscribe.py) It seems pretty dangerous to have the question label > just be the order in which you process the questions. Python does not > guarantee that in a loop that says > for foo in foo_list: > that you will process each foo in the same order every time. Also, what > happens if I reorder these questions (you don't have that functionality > yet, but you need it)? Do you want them to have different question > numbers? I think you want the question name (like 'talk') here. > > Mmm... are you suggesting using the question name as the question ID? That > would work. Ok, I remember now what the problem was with this. There are two ways I could go about naming the fields in the form. 1. I could give them the questions names, i.e. woman, talk, etc. That would go perfect when writing to the database because I could use that word as the ID. BUT, if I do this, when I have to retrieve the fields I don't know how many of them there are, or how to retrieve them all. I don't know if there's anyway of changing the structure that Cgi uses to send the content of the form, or how to add info to this structure. 2. I could give them all the same name: essay. This is what I'm doing now. But then, you said that the for loop doesn't guarantee that I'll be going through the questions always in the same order, and I can't store the question name because I don't have it - cgi doesn't send it, it only sends the content of the fields. Well, it sends the name of the checkboxes (It doesn't send true or false, it either sends woman, or it doesn't send anything) So clearly the cgi approach is quite flakey for what we're trying to do now... what are your thoughts? > > On Fri, Jul 27, 2012 at 6:47 AM, Robin J