or on your form name each set of radio buttons Question1, Question2, etc.

<cfloop from="1" to="#ListLen(FORM.FormFields)#" index="x">
  <cfset currentVar = "FORM.Question" & x>
  <cfset currentVal = "">
  <cfif IsDefined(currentVar)>
    <cfset currentVal = Evaluate(currentVar)>
  </cfif>
</cfloop>

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Kristi J. Bohling
Sent: Tuesday, February 10, 2004 10:10 AM
To: [EMAIL PROTECTED]
Subject: Re: [KCFusion] dynamically names vars


sometimes i use the form.formfields variable and loop through the list of
form fields to populate queries.  kristi

----- Original Message -----
From: Bob
To: [EMAIL PROTECTED]
Sent: Tuesday, February 10, 2004 10:00 AM
Subject: [KCFusion] dynamically names vars


I think i need an extra brain on this.
I have a form which can be seen at www.keys.org/modules/quiz.cfm

Obviously the names of each set of answers have to be unique. The problem is
that the number of questions is not constant so when I go to access these
values in the action page i can't just say form.question1 form.question2
etc. I was trying to figure out some way to dynamically reference the field
values but that does not look like its going to work. Anybody got a better
idea?

Adaryl "Did you reboot?" Wakefield
Aviator by passion
Programmer by sheer force of will



=========================================================
Kansas City ColdFusion User Group's website & listserv is
hosted through the generous support of Clickdoug.com
To send email to the list, email  [EMAIL PROTECTED]
To subscribe or unsubscribe, send an email to [EMAIL PROTECTED] with your
request.
For hosting solutions http://www.clickdoug.com
Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1.
======================================================

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 12/2/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 12/2/2003

 
=========================================================
Kansas City ColdFusion User Group's website & listserv is 
hosted through the generous support of Clickdoug.com
To send email to the list, email  [EMAIL PROTECTED]
To subscribe or unsubscribe, send an email to [EMAIL PROTECTED] with your request.
For hosting solutions http://www.clickdoug.com
Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1. 
======================================================

Reply via email to