I have a form that dynamically populates a select box. I am trying to have the form do the following:
If the user clicks on first select option "Please select the course you would like to view." (which is not dynamic) and hits the submit button nothing should happen and he/she needs stays on the same form page.
However, if the user clicks on the second option (or third or fourth, and so on) which is dynamically populated he/she will be able to view the course description for the particular course that he/she has selected.
Any help will be greatly appreciated. I have ran out of ideas and advil.
<CFQUERY NAME="GetClass" DATASOURCE="course-sql">
SELECT COURSE, COURSE_TITLE, COURSE_DESCRIPTION, COURSE_UNITS
FROM COURSES
ORDER BY COURSE ASC
</CFQUERY>
<cfform action="courses_view.cfm" method="POST">
<cfselect name="COURSE" size="10"><option value="#COURSE#" selected>Please select the course you would like to view.</option>
<CFOUTPUT QUERY="GetClass">
<option value="#COURSE#">#GetClass.COURSE#</option>
</CFOUTPUT>
</cfselect>
<input type="Submit" value="View Course">
</cfform>
If the user clicks on first select option "Please select the course you would like to view." (which is not dynamic) and hits the submit button nothing should happen and he/she needs stays on the same form page.
However, if the user clicks on the second option (or third or fourth, and so on) which is dynamically populated he/she will be able to view the course description for the particular course that he/she has selected.
Any help will be greatly appreciated. I have ran out of ideas and advil.

<CFQUERY NAME="GetClass" DATASOURCE="course-sql">
SELECT COURSE, COURSE_TITLE, COURSE_DESCRIPTION, COURSE_UNITS
FROM COURSES
ORDER BY COURSE ASC
</CFQUERY>
<cfform action="courses_view.cfm" method="POST">
<cfselect name="COURSE" size="10"><option value="#COURSE#" selected>Please select the course you would like to view.</option>
<CFOUTPUT QUERY="GetClass">
<option value="#COURSE#">#GetClass.COURSE#</option>
</CFOUTPUT>
</cfselect>
<input type="Submit" value="View Course">
</cfform>