I am having some trouble with dynamically named checkboxes. This is what I
am trying to do
On a form I have some dynamically named form variables. like....
<Cfloop from = 1 to = #vLoopNUm# index="x">
<input type="text" name="pvAnswer_ID#x#" value="">
<input type="text" name="txtAnswer_Display_sequence#x#" value="">
<input type="text" name="txtObject_Type_ID#x#" value="">
<input type="text" name="txtAnswer_Text#x#" value="">
<input type="text" name="txtAnswer_Field_Name#x#" value="">
<input type="text" name="txtAnswer_Code#x#" value="">
<input type="checkbox" name="chkRemove#x#" value="">
</Cfloop>
I submit to....
<Cfloop from = 1 to = #vLoopNUm# index="x">
<cfset vAnswer_ID = "pvAnswer_ID#x#">
<cfset vAnswer_Display_sequence = "txtAnswer_Display_sequence#x#">
<cfset vObject_Type_ID = "txtObject_Type_ID#x#">
<cfset vAnswer_Text = "txtAnswer_Text#x#">
<cfset vAnswer_Field_Name = "txtAnswer_Field_Name#x#">
<cfset vAnswer_Code = "txtAnswer_Code#x#">
<cfset vRemove = "chkRemove#x#">
#evaluate(vAnswer_ID)#
#evaluate(vAnswer_Display_sequence)#
#evaluate(vObject_Type_ID)#
#evaluate(vAnswer_Text)#
#evaluate(vAnswer_Field_Name)#
#evaluate(vAnswer_Code)#
#evaluate(vRemove)#
<CFloop>
All of these work except for the checkbox. The reason is because checkboxes
aren't submitted of they aren't checked. So I would think that I should use
some thing like this to verify that the variable exists before setting the
variable to it's value.
<cfif #parameterExists(evaluate(vRemove))#>
<cfset vremove = "1">
<cfelse
cfset vremove="0">
<cfif>
but this doesn't work either.
Any Suggestions.
Thanks,
Dave
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
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