Is there any reason why the answer should be dynamic, as opposed to hard 
coded?  If I understand what you are doing, I see nothing inherently wrong 
with it.

At 11:19 AM 10/16/2001 -0500, you wrote:
>I am working on a online survey that has 12 seperate forms to it.  Each
>form consists of Yes/No questions via radio buttons, single select boxes,
>multiple select boxes, and just two text inputs at the very begining.  The
>results from each form are stored in a structure that is held within a
>session variable.  The session var looks much like this:
>
>Ses.Profile["frm1"].Field1 through Ses.Profile["frm12"].Field2
>
>Each answer to a question is worth a certain amount of points and
>sometimes can be worth the same amount of points.  For example question
>one on form one could be a Yes/No question and both Yes and No for that
>one could be equal to 3.  So the setting of the structure when going to
>form two would be(assuming Yes was picked instead of No):
>
>StructUpdate(Ses.Profile["frm1"], "Field1", "Yes");
>
>What I am trying to figure out is what would be the best way to store my
>answer key for this.  The below code is what I have hacked out today, but
>I am curious if I have over complicated how to do the answer(values) key.
>
><cfscript>
>         Answers = StructNew();
>         Answers.FormNumber = ArrayNew(1);
>         Answers.FormNumber[1] = StructNew();
>         Answers.FormNumber[1].Field1 = StructNew();
>         Answers.FormNumber[1].Field1.Yes = "3";
>         Answers.FormNumber[1].Field1.No = "3";
></cfscript>
>
>For the select boxes, I plan to just have their options equal to IDx and
>then do Fieldx.IDx = "myValue"
>
>Snipe - <CF_BotMaster Network="EFNet" Channel="ColdFusion">
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to