You can either do:
isDefined("form.question#questionnumber#")
or
structKeyExists(form,"question#questionnumber#")
I prefer the first method.
=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia
Email : [EMAIL PROTECTED]
Yahoo IM : morpheus
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message-----
> From: Thane Sherrington [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 5:24 AM
> To: CF-Talk
> Subject: IsDefined and Form["test"&var] question
>
>
> If I'm using code like this:
>
> <cfloop index="QuestionNumber" from="1"
> to="#Form.TotalQuestions#" step="1">
> <CFSET Form.NumericAnswer=Form["Question"&QuestionNumber]>
> </CFLOOP>
>
> Is there a way to use IsDefined to check to see if the form
> variable has
> been defined? I tried
> <CFIF IsDefined("Form["Question"&QuestionNumber]")>
>
> but I get the error
> Invalid parser construct found on line 8 at position 25.
> ColdFusion was
> looking at the following text:Question
>
> T
>
>
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
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