I have an interesting problem here...
<cfloop from="1" to="#form.countField#" index="i">
<cfif isdefined('form["semester#i#"]')>
<cfquery name = "insertCourses" datasource="cas_evaluation">
INSERT INTO courses (faculty, semester, course, students, hours, team_taught, first_time, ec_dl, online, course_revision )
VALUES ( '#form.name#', '#form['semester#i#']#', '#form['course#i#']#', '#form['numstudents#i#']#', '#form['hours#i#']#', '#form['team#i#']#', '#form['firsttime#i#']#', '#form['ec_dl#i#']#', '#form['online#i#']#', '#form['revision#i#']#')
</cfquery>
</cfif>
</cfloop>
Basically, I have some dynamic fields that can be added in or deleted. (These are rows of fields btw...) The way I have it coded...if the user deletes a row in the middle... ( they delete row 2 and rows 1 and 3 are left...) it causes problems because the loop is looking for it but it is not there obviously. So I tried checking to see if one of the fields were defined...but it doesn't like the syntax of the isdefined variable.. :(
any suggestions?