Why won't this work now ?
I have the following code in my action page, and it works.
<cfif form.urdn_action is "1">
<cfif StructKeyExists(form, "fieldnames")>
<cfloop index="i" list="#trim(form.fieldnames)#">
<cfif ListFirst(i, "/") is "comments">
<cfset select_urdn_number = listgetat(i, 2, "/")>
<cfset select_urdn_line_item = listlast(i, "/")>
<cfset combineEnd = select_urdn_number & "/" & select_urdn_line_item>
<cfif StructKeyExists(form, "del/" & combineEnd) and form["del/" & combineEnd] is "Yes">
<cfset select_comments = form["comments/" & combineEnd]>
..then update table below.....
However,when I switch it to one form only, (no action page, submitting to it self), I change it slightly by adding
<cfif structkeyexists(form, "btnSubmit")> before everyting else.
<cfif structkeyexists(form, "btnSubmit")>
<cfif form.urdn_action is "1">
<cfif StructKeyExists(form, "fieldnames")>
<cfloop index="i" list="#trim(form.fieldnames)#">
<cfif ListFirst(i, "/") is "comments">
<cfset select_urdn_number = listgetat(i, 2, "/")>
<cfset select_urdn_line_item = listlast(i, "/")>
<cfset combineEnd = select_urdn_number & "/" & select_urdn_line_item>
<cfif StructKeyExists(form, "del/" & combineEnd) and form["del/" & combineEnd] is "Yes">
<cfset select_comments = form["comments/" & combineEnd]>
...then update tables....
Now the tables are not being updated. Why did the extra cfif structkeyexists prevent the form from working now ?
