<!--- Get list of ratings from database --->
<CFSTOREDPROC PROCEDURE="owsWeb.FetchRatingsList" DATASOURCE="owsOra">
  <!--- This output parameter gives ColdFusion a pointer to reference cursor --->
  <CFPROCPARAM 
    TYPE="Out" 
    CFSQLTYPE="CF_SQL_REFCURSOR" 
    VARIABLE="IgnoreThis" 
    MAXROWS="-1">
  <!--- Make the data from reference cursor available as CFML query object --->  
  <CFPROCRESULT NAME="GetRatings">
</CFSTOREDPROC>

<HTML>
<HEAD><TITLE>Film Entry Form</TITLE></HEAD>
<BODY>
<H2>Film Entry Form</H2>

<!--- Data entry form --->
<CFFORM ACTION="#CGI.SCRIPT_NAME#" METHOD="POST" PRESERVEDATA="Yes">

  <!--- Text entry field for film title --->
  <P><B>Title for New Film:</B><BR>
  <CFINPUT NAME="MovieTitle" SIZE="50" MAXLENGTH="50"
    REQUIRED="Yes" MESSAGE="Please don't leave the film's title blank."><BR>

  <!--- Text entry field for pitch text --->
  <P><B>Short Description / One-Liner:</B><BR>
  <CFINPUT NAME="PitchText" SIZE="50" MAXLENGTH="100"
    REQUIRED="Yes" MESSAGE="Please don't leave the one-liner blank."><BR>
  
  <!--- Text entry field for expense description --->
  <P><B>New Film Budget:</B><BR>
  <CFINPUT NAME="AmountBudgeted" SIZE="15" 
    REQUIRED="Yes" MESSAGE="Please enter a valid number for the film's budget."
    VALIDATE="float"><BR>

  <!--- Drop-down list of ratings --->  
  <P><B>Rating:</B><BR>
  <CFSELECT
    NAME="RatingID"  
    QUERY="GetRatings"
    VALUE="RatingID"
    DISPLAY="Rating"/>

  <!--- Text areas for summary --->
  <P><B>Summary:</B><BR>
  <TEXTAREA NAME="Summary" COLS="40" ROWS="3" WRAP="soft"></TEXTAREA>  
    
  <!--- Submit button for form --->
  <P><INPUT TYPE="Submit" VALUE="Submit New Film">
</CFFORM>  

  
</BODY>
</HTML>
