Any reason why you don't use the form itself?

For example

<cfloop collection="#Form#" index="value"></cfloop>

Would that not return the variable name in value, in which you could then do

form[value] to get the value that the user entered?


-- 
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/108193156965451149543



On Fri, Mar 9, 2012 at 1:26 AM, Rob Voyle <[email protected]> wrote:

>
> Hi folks
>
> I have a cfloop to check erros in a forms entry:
>
> <cfloop index="checkVariables"
> list="#emailAddress#,
> #nameTitle#,
> #nameFirst#,
> #nameLast#,
> #address#,
> #phone#"
> delimiters = ",">
>
> <cfif REFind('[_~##^*+={}/|\\\[\]]', checkVariables)>
>        <cfset badCharacter="yes">
>        <cfset errorData=1>
>        <cfset errorDataMessage="<h3>You have an illegal character """ &
> checkvariables & " ""  in one of the fields</h3>">
>        </cfif>
>
> <cfloop>
>
> What I want to be able to do is create a specific error message such as:
>
> error & listitem to yield
>
> errorEmailAddress
> errornameTitle
> errornamefirst etc.
>
> How do I create the specific error variable name?
>
> Thanks
> Rob
> Robert J. Voyle, Psy.D.
> Director, Clergy Leadership Institute
> For Coaching and Training in Appreciative Inquiry
> Author: Restoring Hope: Appreciative Strategies
>             to Resolve Grief and Resentment
> http://www.appreciativeway.com/
> 503-647-2378 or 503-647-2382
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5816
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm

Reply via email to