bruce got it...
#form[bestpracticeID]#
but we are using an older version - CF 4.5 and that solution generated an
error. I decided to restructure things a little, so i didn't need the
evaluate function. the problem i run into with evaluate() is that when the
content of the form field contains unmatched quotes, it throws an error.
for example:
form.q_1 = "this is an answer that wouldn't work - notice single quote."
form.q_2 = "another answer just so it looks like there is something to loop
through."
when you loop through:
<cfloop ... >
<cfinsert ... >
INTO tablename (bestpracticeID)
VALUES ('#evaluate("form.q_#bestpracticeID#")#')
</cfinsert>
</cfloop>
it hits the single quote in the first variable's value and an error is
generated. but i solved it -- now the users save one answer at a time.
so now i can set: form.answer = "this is an answer that wouldn't work" and
take out the loop because there is only one answer per form. no need to
Band-Aid the cut, just amputate the finger... now i'm movin' on to the next
problem... ;)
kristi
----- Original Message -----
From: "Ramsey Abu-Absi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 04, 2004 2:05 PM
Subject: Re: [KCFusion] evaluate function...
> What was the answer, Kristi? I'm curious now!
>
> Thanks,
> Ramsey
>
> At 02:43 PM 6/4/2004, you wrote:
> >nevermind... just after i sent it, i found it. thanks. kristi
> >
> >----- Original Message -----
> >From: "Kristi J. Bohling" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Friday, June 04, 2004 1:28 PM
> >Subject: [KCFusion] evaluate function...
> >
> >
> > > okay, i know i've read about it here somewhere... but can't find it in
the
> > > archives... someone posted an article from macromedia that discussed
how
> >to
> > > use something other than evaluate() to access a form field using a
> > > variable...
> > >
> > > in other words, i have this: '#evaluate("form.q_#bestpracticeID#")#'
but
> >i
> > > thought i read a post that said there was a better way...
> > >
> > > anybody remember this?
> > >
> > > kristi
> > >
> > >
> > >
> > > =========================================================
> > > 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 (un)subscribe, email [EMAIL PROTECTED] with your request.
> > > For hosting solutions http://www.clickdoug.com
> > > Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1.
> > > ======================================================
> > >
> > >
> >
> >
> >
> >=========================================================
> >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 (un)subscribe, email [EMAIL PROTECTED] with your request.
> >For hosting solutions http://www.clickdoug.com
> >Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1.
> >======================================================
>
>
> =========================================================
> 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 (un)subscribe, email [EMAIL PROTECTED] with your request.
> For hosting solutions http://www.clickdoug.com
> Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1.
> ======================================================
>
>
=========================================================
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 (un)subscribe, email [EMAIL PROTECTED] with your request.
For hosting solutions http://www.clickdoug.com
Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1.
======================================================