> I've been reading about java objects.  Do i need to add a <cfobject> 
> tag here somewhere and create the java class?

No. Internally CF objects are java objects, but that is not important here. The 
relevant part of the error message is "Element cyeID1 is undefined in .. 
FormScope". Meaning CF is not finding the form field variable form.cyeID1.  As 
Adrian said, you should cfdump the form scope at the very top of your action 
page, before any other code.  

Your form is using method="post", correct? If it uses method="get" the 
variables will be in the URL scope, not FORM.  Also, is your form submitted to 
the same page?  If it is you need to verify the form was submitted before using 
any of the form variables.  

<!--- if the form was submitted --->
<cfif structKeyExists(form, "FormAction") AND form.FormAction is "Save">   
   ... do update code here ..
</cfif>

Here is a hard coded example of a self posting form that might help. Save it to 
a file and click the "Test This" button. 

<!--- show everything in the form scope. --->
<!--- the scope will be empty before the form is submitted --->
<cfdump var="#FORM#">

<cfif structKeyExists(form, "FormAction") AND form.FormAction is "Save">   
   <cfloop from="1" to="#form.Records#" index="ii">     
      <cfparam name="form.Earnings#ii#" type="integer" default="0">     
      <cfset variables.thisId = form["cyeID"& ii]/>     
      <cfset variables.thisRate = form["Earnings"& ii]/>

      <!--- show the field values to demonstrate it works ... --->
      <!--- replace this code with your cfquery ... --->
      <cfoutput>
       field form.cyeID#ii# equals #variables.thisId#<br>
       field form.Earnings#ii# equals #variables.thisRate#<hr>
      </cfoutput>

   </cfloop> 
</cfif>

<!--- submit the form to this same page --->
<cfoutput>
<form action="#CGI.SCRIPT_NAME#" method="post">
</cfoutput>
   1.
   <input type="text" name="cyeID1" value="16">
   <input type="text" name="Earnings1" value="100"><br>
   2. 
   <input type="text" name="cyeID2" value="22">
   <input type="text" name="Earnings2" value="350">

   <!--- save the number of records. in this example:  (2) --->
   <input type="hidden" name="Records" value="2">
   <input type="hidden" name="FormAction" value="save">
   <input type="submit" value="Test This">
</form>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3264
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to