This is totally divorced from your code to keep it easy to read.Applying
the algorithm to your specific formatting will be trivial.
cfset idlist = valueList(testimonials.testimonialID) /
cfloop query=testimonials
input type=checkbox name=testimonials value=#testimonialID#
cfif listFind(idlist,
-Talk
Subject: RE: dynamic checkboxes...
This is totally divorced from your code to keep it easy to read.Applying
the algorithm to your specific formatting will be trivial.
cfset idlist = valueList(testimonials.testimonialID) /
cfloop query=testimonials
input type=checkbox name=testimonials value
try this:
cfset variables.testVar = 102310OLD=QQQ100,202301OLD=QQQ200
cfset variables.nvPair1 = listGetAt(variables.testVar,1)
cfset variables.nvPair2 = listGetAt(variables.testVar,2)
cfset variables.var1=listGetAt(variables.nvPair1,1,)
cfset
= ,
-- Lisa
-Original Message-
From: Michael Corbridge [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 12:18 PM
To: CF-Talk
Subject: RE: Dynamic checkboxes and the resultant page.
try this:
cfset variables.testVar = 102310OLD=QQQ100,202301OLD=QQQ200
cfset variables.nvPair1
I'd probably use arrays on your action page...
cfparam name=form.checkbox type=string default=
cfif len(trim(form.checkbox))
cfset checkboxes = listtoarray(form.checkbox)
cfloop index=x from=1 to=#arraylen(checkboxes)#
cfset checkboxes[x] =
I am having some trouble with dynamically named checkboxes.
On a form I have some dynamically named form variables. like
Cfloop from = 1 to = #vLoopNUm# index=x
...
input type=checkbox name=chkRemove#x# value=
/Cfloop
I submit to
Cfloop from = 1 to = #vLoopNUm#
Well, the isDefined statement would be a good thing to use here.
cfif isDefined(form.chkRemove#X#)
cfset remove=true
cfelse
cfset remove=false
/cfif
and then test for remove for processing (assuming you are processing it
inside the loop). By the way, I typically use conditional looping
7 matches
Mail list logo