I have dynamically created courses and their schedule on a form page which I verified submit fine to an action page. My only problem is I can't get the action page to detect a time match (schedule conflict). Any ideas?
<!---form page--->
<INPUT TYPE="Checkbox" NAME="checkbox#GetCourseList.currentrow#" VALUE="#CourseNumber#">
<cfif #MondayTime# IS NOT ""><input type="hidden" name="MondayTime#GetCourseList.currentrow#" value="#GetCourseList.MondayTime#"></cfif>
<!---Action page: Loop over all times--->
<cfloop from="1" to="#Form.numGroups#" index="iGroup">
<!--- Deterine whether this times checkbox was checked --->
<cfset tmp = SetVariable("currCheckbox", "Form.checkbox" & iGroup)>
<cfparam name="#currCheckbox#" default="">
<cfoutput>
<cfif Evaluate(currCheckbox) is not "">
<cfset tmp = SetVariable("currMondayTime", "Form.MondayTime" & iGroup)>
<!--- Compare this time to each other time --->
<cfloop from="1" to="#Form.numGroups#" index="jGroup">
<!--- Skip the comparison if we're dealing with the same time--->
<cfif iGroup is not jGroup>
<cfset tmp = SetVariable("otherMondayTime", "Form.MondayTime" & jGroup)>
<cfif Evaluate("currMondayTime" is Evaluate("otherMondayTime">
The times match.
</cfif>
</cfif>
</cfloop>
</cfif>
</cfoutput>
</cfloop>
<!---form page--->
<INPUT TYPE="Checkbox" NAME="checkbox#GetCourseList.currentrow#" VALUE="#CourseNumber#">
<cfif #MondayTime# IS NOT ""><input type="hidden" name="MondayTime#GetCourseList.currentrow#" value="#GetCourseList.MondayTime#"></cfif>
<!---Action page: Loop over all times--->
<cfloop from="1" to="#Form.numGroups#" index="iGroup">
<!--- Deterine whether this times checkbox was checked --->
<cfset tmp = SetVariable("currCheckbox", "Form.checkbox" & iGroup)>
<cfparam name="#currCheckbox#" default="">
<cfoutput>
<cfif Evaluate(currCheckbox) is not "">
<cfset tmp = SetVariable("currMondayTime", "Form.MondayTime" & iGroup)>
<!--- Compare this time to each other time --->
<cfloop from="1" to="#Form.numGroups#" index="jGroup">
<!--- Skip the comparison if we're dealing with the same time--->
<cfif iGroup is not jGroup>
<cfset tmp = SetVariable("otherMondayTime", "Form.MondayTime" & jGroup)>
<cfif Evaluate("currMondayTime" is Evaluate("otherMondayTime">
The times match.
</cfif>
</cfif>
</cfloop>
</cfif>
</cfoutput>
</cfloop>