Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with hidden form fields

Status
Not open for further replies.

leadman

Programmer
Jun 11, 2001
177
US
I have built a template where customers can make last second edits to their checkout info. The shopping cart items info is held in a session structure, everything else (billing info, shipping info, etc) is passed as form variables. On the edit page i include a table that views the current products in the cart and offers the ability to add or delete from the product quatities (with plus and minus buttons that subit to the same page) - it works great back on the original template it is used on (before the checkout process). Now i cant even get to the page without an error. The cause seems to be the bunch of extra hidden fields i needed to add to the form. When I comment them out, i can get to the edit page without an error BUT i need them in so that the variables are passed.
Could some one give me some insight into what is happening here? Below i have included the error message and then the form along with the hidden fields that seem to be causing the problem commented out (note - the error occurs at attempts to get at the session structure that occur after the hidden fields). Thanks for any help:

===================error message=================
The member "" in dimension 1 of object "session.cart" cannot be found. Please, modify the member name.

The error occurred while evaluating the expression:

#session.cart[2]#

The error occurred while processing an element with a general identifier of (#session.cart[2]#), occupying document position (123:69) to (123:88).

==================code===========================
<td><font face=&quot;arial&quot; size=3>#session.cart[4]#</font></td>
<form method=&quot;post&quot; action=&quot;checkout_edit.cfm&quot;>
<input type=&quot;hidden&quot; name=&quot;upper&quot; value=&quot;up&quot;>
<input type=&quot;hidden&quot; name=&quot;name&quot; value=&quot;#session.cart[2]#&quot;>
<input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;#session.cart[1]#&quot;>
<input type=&quot;hidden&quot; name=&quot;price&quot; value=&quot;#session.cart[3]#&quot;>
<input type=&quot;hidden&quot; name=&quot;weight&quot; value=&quot;#session.cart[5]#&quot;>
<input type=&quot;hidden&quot; name=&quot;quantity&quot; value=&quot;1&quot;>

<!---<input type=&quot;hidden&quot; name=&quot;cardtype&quot; value=&quot;#form.cardtype#&quot;>
<input type=&quot;hidden&quot; name=&quot;cardname&quot; value=&quot;#form.cardname#&quot;>
<input type=&quot;hidden&quot; name=&quot;x_Card_Num&quot; value=&quot;#form.x_Card_Num#&quot;>
<input type=&quot;hidden&quot; name=&quot;x_Exp_Date&quot; value=&quot;#form.x_Exp_Date#&quot;>
<input type=&quot;hidden&quot; name=&quot;totwship&quot; value=&quot;#form.totwship#&quot;>
<input type=&quot;hidden&quot; name=&quot;total&quot; value=&quot;#form.total#&quot;>
<input type=&quot;hidden&quot; name=&quot;shipcost&quot; value=&quot;#form.shipcost#&quot;>
<input type=&quot;hidden&quot; name=&quot;shipping&quot; value=&quot;#form.shipping#&quot;>
<input type=&quot;hidden&quot; name=&quot;cartweight&quot; value=&quot;#form.cartweight#&quot;>
<input type=&quot;hidden&quot; name=&quot;giftwrapOn&quot; value=&quot;#form.giftwrapOn#&quot;>
<input type=&quot;hidden&quot; name=&quot;giftTexton&quot; value=&quot;#form.giftTexton#&quot;>
<cfif isDefined(&quot;form.giftwrapOn&quot;) AND form.giftwrapOn EQ &quot;yes&quot;>
<input type=&quot;hidden&quot; name=&quot;giftStyle&quot; value=&quot;#form.giftStyle#&quot;>
</cfif>
<cfif isDefined(&quot;form.giftTexton&quot;) AND form.giftTexton EQ &quot;yes&quot;>
<input type=&quot;hidden&quot; name=&quot;giftText&quot; value=&quot;#form.giftText#&quot;>
</cfif>
<cfloop list=&quot;#dbfields#&quot; index=&quot;i&quot;>
<input type=&quot;hidden&quot; name=&quot;#i#&quot; value=&quot;#evaluate(i)#&quot;>
</cfloop>
<cfloop list=&quot;#dbfields2#&quot; index=&quot;i&quot;>
<input type=&quot;hidden&quot; name=&quot;#i#&quot; value=&quot;#evaluate(i)#&quot;>
</cfloop>--->
 
What happens if you comment away just the line
<input type=&quot;hidden&quot; name=&quot;name&quot; value=&quot;#session.cart[2]#&quot;>
Do you still get an error?

Kenvase
 
When I comment that line away (line 123) then the error is thrown on the next line (line 124) - here is the error:

The member &quot;&quot; in dimension 1 of object &quot;session.cart&quot; cannot be found. Please, modify the member name.

The error occurred while evaluating the expression:

#session.cart[1]#

The error occurred while processing an element with a general identifier of (#session.cart[1]#), occupying document position (124:67) to (124:86).
 
Will you post the code of then entire page please? - tleish
 
here it is:

<cfset dbfields=&quot;firstname,lastname,phone,fax,email,address1,address2,city,state,zip&quot;>
<cfset dbfields2=&quot;sfirstname,slastname,sphone,sfax,semail,saddress1,saddress2,scity,sstate,szip&quot;>

<!---- This code was changed to allow for graphic submit buttons --->
<cfif isdefined(&quot;form.upper&quot;)>
<!---- <cfif trim(form.action) eq &quot;+&quot;> --->
<cf_addItem
strProdID=&quot;#form.id#&quot;
strProdName=&quot;#form.name#&quot;
curPrice=&quot;#form.price#&quot;
quantity=&quot;#form.quantity#&quot;
numWeight=&quot;#form.weight#&quot;
>
<!---- <cfelseif trim(form.action) eq &quot;-&quot;> --->
</cfif>
<cfif isdefined(&quot;form.downer&quot;)>
<cf_dropItem strProdName=&quot;#form.name#&quot;>
</cfif>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;>
<cfinclude template=&quot;checkout_header3.html&quot;>
<table width=&quot;100%&quot; border=&quot;0&quot;>
<tr>
<td width=&quot;125&quot; valign=&quot;top&quot;>
<cfinclude template=&quot;checkout_leftborder.cfm&quot;></td>
<td width=&quot;796&quot; valign=&quot;top&quot;>

<table width=&quot;80%&quot; border=&quot;0&quot; align=&quot;center&quot;>
<tr>
<td width=&quot;9%&quot;></td>
<td width=&quot;66%&quot;><font face=&quot;Arial, Helvetica, sans-serif&quot;><b>Click on
the &quot;Submit Edits&quot; button at the bottom of the page when
finished editing.</b></font></td>
<td width=&quot;25%&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;9%&quot;></td>
<td width=&quot;66%&quot;>&nbsp;</td>
<td width=&quot;25%&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;9%&quot;></td>
<td width=&quot;66%&quot;><font face=&quot;Arial, Helvetica, sans-serif&quot;>Edit Shopping
Cart</font></td>
<td width=&quot;25%&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;9%&quot; valign=&quot;top&quot;></td>
<td width=&quot;66%&quot; valign=&quot;top&quot;>
<table border=1 width=100% cellspacing=1>
<tr bgcolor=&quot;#51D89E&quot;>
<td colspan=3 align=center><font face=&quot;arial&quot; size=4 color=white>Shopping
Cart Contents</font></td>
</tr>
<tr bgcolor=&quot;#A6EBCE&quot;>
<td><font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;#000000&quot;>Product</font></td>
<td width=&quot;100&quot;><font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;#000000&quot;>Quantity</font></td>
<td align=right><font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;#000000&quot;>Price</font></td>
</tr>
<!--- Make sure that the shopping cart structure exists and is the correct format --->
<cfif isdefined(&quot;session.cart&quot;)>
<cfif IsStruct(session.cart)>
<!--- Initialize variables --->
<cfset subtotal = 0>
<cfoutput>
<!---
To output the contents, all we're going to do is loop over our cart structure one item at a time --->
<cfloop collection=&quot;#session.cart#&quot; item=&quot;i&quot;>
<!--- This is the workhorse that will output the item info --->
<cfset subtotal = subtotal + (session.cart[4] * session.cart[3])>
<tr>
<td valign=top><font face=&quot;arial&quot; size=2>#session.cart[2]#</font></td>
<!--- This is the original show cart code
<td valign=top><font face=&quot;arial&quot; size=2>#session.cart[4]#</font></td> --->
<!---- This is the modified code created during the checkout counter portion --->
<td valign=top>
<table border=0 width=100%>
<tr>
<td><font face=&quot;arial&quot; size=3>#session.cart[4]#</font></td>
<form method=&quot;post&quot; action=&quot;checkout_edit.cfm&quot;>
<input type=&quot;hidden&quot; name=&quot;upper&quot; value=&quot;up&quot;>
<input type=&quot;hidden&quot; name=&quot;name&quot; value=&quot;#session.cart[2]#&quot;>
<input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;#session.cart[1]#&quot;>
<input type=&quot;hidden&quot; name=&quot;price&quot; value=&quot;#session.cart[3]#&quot;>
<input type=&quot;hidden&quot; name=&quot;weight&quot; value=&quot;#session.cart[5]#&quot;>
<input type=&quot;hidden&quot; name=&quot;quantity&quot; value=&quot;1&quot;>

<input type=&quot;hidden&quot; name=&quot;cardtype&quot; value=&quot;#form.cardtype#&quot;>
<input type=&quot;hidden&quot; name=&quot;cardname&quot; value=&quot;#form.cardname#&quot;>
<input type=&quot;hidden&quot; name=&quot;x_Card_Num&quot; value=&quot;#form.x_Card_Num#&quot;>
<input type=&quot;hidden&quot; name=&quot;x_Exp_Date&quot; value=&quot;#form.x_Exp_Date#&quot;>
<input type=&quot;hidden&quot; name=&quot;totwship&quot; value=&quot;#form.totwship#&quot;>
<input type=&quot;hidden&quot; name=&quot;total&quot; value=&quot;#form.total#&quot;>
<input type=&quot;hidden&quot; name=&quot;shipcost&quot; value=&quot;#form.shipcost#&quot;>
<input type=&quot;hidden&quot; name=&quot;shipping&quot; value=&quot;#form.shipping#&quot;>
<input type=&quot;hidden&quot; name=&quot;cartweight&quot; value=&quot;#form.cartweight#&quot;>
<input type=&quot;hidden&quot; name=&quot;giftwrapOn&quot; value=&quot;#form.giftwrapOn#&quot;>
<input type=&quot;hidden&quot; name=&quot;giftTexton&quot; value=&quot;#form.giftTexton#&quot;>
<cfif isDefined(&quot;form.giftwrapOn&quot;) AND form.giftwrapOn EQ &quot;yes&quot;>
<input type=&quot;hidden&quot; name=&quot;giftStyle&quot; value=&quot;#form.giftStyle#&quot;>
</cfif>
<cfif isDefined(&quot;form.giftTexton&quot;) AND form.giftTexton EQ &quot;yes&quot;>
<input type=&quot;hidden&quot; name=&quot;giftText&quot; value=&quot;#form.giftText#&quot;>
</cfif>
<cfloop list=&quot;#dbfields#&quot; index=&quot;i&quot;>
<input type=&quot;hidden&quot; name=&quot;#i#&quot; value=&quot;#evaluate(i)#&quot;>
</cfloop>
<cfloop list=&quot;#dbfields2#&quot; index=&quot;i&quot;>
<input type=&quot;hidden&quot; name=&quot;#i#&quot; value=&quot;#evaluate(i)#&quot;>
</cfloop>
<td align=right>
<input type=&quot;image&quot; src=&quot;images/plus.gif&quot; name=&quot;action2&quot; value=&quot; + &quot;>
</td>
</form>
<form method=&quot;post&quot; action=&quot;checkout_edit.cfm&quot;>
<input type=&quot;hidden&quot; name=&quot;downer&quot; value=&quot;down&quot;>
<input type=&quot;hidden&quot; name=&quot;name&quot; value=&quot;#session.cart[2]#&quot;>
<input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;#session.cart[1]#&quot;>
<input type=&quot;hidden&quot; name=&quot;price&quot; value=&quot;#session.cart[3]#&quot;>
<input type=&quot;hidden&quot; name=&quot;weight&quot; value=&quot;#session.cart[5]#&quot;>
<input type=&quot;hidden&quot; name=&quot;quantity&quot; value=&quot;1&quot;>

<input type=&quot;hidden&quot; name=&quot;cardtype&quot; value=&quot;#form.cardtype#&quot;>
<input type=&quot;hidden&quot; name=&quot;cardname&quot; value=&quot;#form.cardname#&quot;>
<input type=&quot;hidden&quot; name=&quot;x_Card_Num&quot; value=&quot;#form.x_Card_Num#&quot;>
<input type=&quot;hidden&quot; name=&quot;x_Exp_Date&quot; value=&quot;#form.x_Exp_Date#&quot;>
<input type=&quot;hidden&quot; name=&quot;totwship&quot; value=&quot;#form.totwship#&quot;>
<input type=&quot;hidden&quot; name=&quot;total&quot; value=&quot;#form.total#&quot;>
<input type=&quot;hidden&quot; name=&quot;shipcost&quot; value=&quot;#form.shipcost#&quot;>
<input type=&quot;hidden&quot; name=&quot;shipping&quot; value=&quot;#form.shipping#&quot;>
<input type=&quot;hidden&quot; name=&quot;cartweight&quot; value=&quot;#form.cartweight#&quot;>
<input type=&quot;hidden&quot; name=&quot;giftwrapOn&quot; value=&quot;#form.giftwrapOn#&quot;>
<input type=&quot;hidden&quot; name=&quot;giftTexton&quot; value=&quot;#form.giftTexton#&quot;>
<cfif isDefined(&quot;form.giftwrapOn&quot;) AND form.giftwrapOn EQ &quot;yes&quot;>
<input type=&quot;hidden&quot; name=&quot;giftStyle&quot; value=&quot;#form.giftStyle#&quot;>
</cfif>
<cfif isDefined(&quot;form.giftTexton&quot;) AND form.giftTexton EQ &quot;yes&quot;>
<input type=&quot;hidden&quot; name=&quot;giftText&quot; value=&quot;#form.giftText#&quot;>
</cfif>
<cfloop list=&quot;#dbfields#&quot; index=&quot;i&quot;>
<input type=&quot;hidden&quot; name=&quot;#i#&quot; value=&quot;#evaluate(i)#&quot;>
</cfloop>
<cfloop list=&quot;#dbfields2#&quot; index=&quot;i&quot;>
<input type=&quot;hidden&quot; name=&quot;#i#&quot; value=&quot;#evaluate(i)#&quot;>
</cfloop>
<td align=right>
<input type=&quot;image&quot; name=&quot;action&quot; src=&quot;images/minus.gif&quot; value=&quot; - &quot;>
</td>
</form>
</tr>
</table>
</td>
<!---- This is the modified code created during the checkout counter portion --->
<td valign=top align=right><font face=&quot;arial&quot; size=2>#dollarformat(session.cart[3])#</font></td>
</tr>
</cfloop>
<cfscript>
// After we've output all of the items in the cart,
// let's calculate some of the derived values we'll need.
// salesTax = subtotal * application.taxrate;
total = subtotal;

</cfscript>
<!--- This is where we print out the summary info that we just calculated --->
<tr>
<td colspan=3><br>
</td>
</tr>
<tr>
<!--- This piece was added during the checkout counter phase --->
<td align=right><font face=&quot;arial&quot; size=2>SubTotal</font></td>
<td align=right><font face=&quot;arial&quot; size=2>#dollarformat(subtotal)#</font></td>
</tr>
<!--<tr>
<td align=right><font face=&quot;arial&quot; size=2>Tax</font></td>
<td align=right><font face=&quot;arial&quot; size=2></font></td>
</tr>
<tr>
<td align=right><font face=&quot;arial&quot; size=2>Total</font></td>
<td align=right><font face=&quot;arial&quot; size=2>#dollarformat(total)#</font></td>
</tr>
-->
</cfoutput>
</cfif>
</cfif>
</table>
</td>
<td width=&quot;25%&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;9%&quot; valign=&quot;top&quot;></td>
<td width=&quot;66%&quot; valign=&quot;top&quot;>&nbsp;</td>
<td width=&quot;25%&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;9%&quot; valign=&quot;top&quot; height=&quot;22&quot;></td>
<!--- this loops through the cart adding each product weight to get total cart weight --->
<cfset cartweight = 0>
<cfloop collection=&quot;#session.cart#&quot; item=&quot;i&quot;>
<cfset cartweight = cartweight + ((session.cart[5]) * (session.cart[4]))>
</cfloop>
<td width=&quot;66%&quot; valign=&quot;top&quot; height=&quot;22&quot;><font face=&quot;Arial, Helvetica, sans-serif&quot;>Edit
Shipping Options.:</font></td>
<td width=&quot;25%&quot; height=&quot;22&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;9%&quot; valign=&quot;top&quot;></td>
<cfform name=&quot;form1&quot; method=&quot;post&quot; action=&quot;cc_info2.cfm&quot;>
<td rowspan=&quot;4&quot; valign=&quot;top&quot;>
<table border=0 width=100%>
<tr>
<td colspan=2 bgcolor=#51D89E>
<div align=&quot;center&quot;><font size=&quot;4&quot; face=&quot;arial&quot; color=&quot;#FFFFFF&quot;>Shipping
Options</font> </div>
</td>
</tr>
<tr>
<td colspan=2>
<table border=0 width=100%><cfoutput>
<tr>
<td align=left width=&quot;150&quot;> <font face=&quot;arial&quot; size=2>
<input type=radio name=&quot;shipping&quot;
<cfif form.shipping EQ &quot;1DA&quot;>checked</cfif> value=1DA>
Next Day Air</font></td>
<cf_UPSPrice SERVICE=&quot;1DA&quot; FROM=&quot;06851&quot; TO=&quot;#form.szip#&quot; WEIGHT=&quot;#cartweight#&quot;>
<cfif isDefined(&quot;UPS_Charge&quot;) and UPS_Charge gt 0>
<cfset ndaPrice=#UPS_Charge# + 2>
</cfif>
<td align=left>#DollarFormat(ndaPrice)#</td>
<td align=right rowspan=&quot;3&quot;></td>
</tr>
<tr>
<td align=left width=&quot;150&quot;><font face=&quot;arial&quot; size=2>
<input type=radio name=&quot;shipping&quot;
<cfif form.shipping EQ &quot;2DA&quot;>checked</cfif>value=2DA>
2nd Day Air</font></td>
<cf_UPSPrice SERVICE=&quot;2DA&quot; FROM=&quot;06851&quot; TO=&quot;#form.szip#&quot; WEIGHT=&quot;#cartweight#&quot;>
<cfif isDefined(&quot;UPS_Charge&quot;) and UPS_Charge gt 0>
<cfset sdaPrice=#UPS_Charge# + 2>
</cfif>
<td align=left>#DollarFormat(sdaPrice)#</td>
</tr>
<tr>
<td align=left width=&quot;150&quot;><font face=&quot;arial&quot; size=2>
<input type=radio name=&quot;shipping&quot;
<cfif form.shipping EQ &quot;3GNDRES&quot;>checked</cfif>value=3GNDRES>
Ground </font> </td>
<cf_UPSPrice SERVICE=&quot;GNDRES&quot; FROM=&quot;06851&quot; TO=&quot;#form.szip#&quot; WEIGHT=&quot;#cartweight#&quot;>
<cfif isDefined(&quot;UPS_Charge&quot;) and UPS_Charge gt 0>
<cfset gndPrice=#UPS_Charge# + 2>
</cfif>
<td align=left>#DollarFormat(gndPrice)#</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=2 height=&quot;59&quot;>
<table border=0 width=100%>
<tr>
<td width=&quot;150&quot;>
<input type=&quot;checkbox&quot; name=&quot;giftwrapOn&quot;
<cfif isDefined(&quot;form.giftwrapOn&quot;) AND form.giftwrapOn EQ &quot;yes&quot;>checked
</cfif>
value=&quot;yes&quot;>
<font size=2 face=arial>Gift Wrapping</font> </td>
<td bgcolor=&quot;orange&quot; width=&quot;50&quot;>
<input type=&quot;radio&quot;
<cfif isDefined(&quot;form.giftStyle&quot;) AND form.giftStyle EQ &quot;1&quot;>checked
</cfif>name=&quot;giftStyle&quot; value=1>
</td>
<td bgcolor=&quot;yellow&quot; width=&quot;50&quot;>
<input type=&quot;radio&quot;
<cfif isDefined(&quot;form.giftStyle&quot;) AND form.giftStyle EQ &quot;2&quot;>checked
</cfif>name=&quot;giftStyle&quot; value=2>
</td>
<td bgcolor=&quot;red&quot; width=&quot;50&quot;>
<input type=&quot;radio&quot;
<cfif isDefined(&quot;form.giftStyle&quot;) AND form.giftStyle EQ &quot;3&quot;>checked
</cfif>name=&quot;giftStyle&quot; value=3>
</td>
<td bgcolor=&quot;green&quot; width=&quot;50&quot;>
<input type=&quot;radio&quot;
<cfif isDefined(&quot;form.giftStyle&quot;) AND form.giftStyle EQ &quot;4&quot;>checked
</cfif>name=&quot;giftStyle&quot; value=4>
</td>
<td> </td>
<td>&nbsp;</td>
</tr>
<tr>
<td width=&quot;150&quot;>&nbsp; </td>
<td bgcolor=&quot;blue&quot; width=&quot;50&quot;>
<input type=&quot;radio&quot;
<cfif isDefined(&quot;form.giftStyle&quot;) AND form.giftStyle EQ &quot;5&quot;>checked
</cfif>name=&quot;giftStyle&quot; value=5>
</td>
<td bgcolor=&quot;aqua&quot; width=&quot;50&quot;>
<input type=&quot;radio&quot;
<cfif isDefined(&quot;form.giftStyle&quot;) AND form.giftStyle EQ &quot;6&quot;>checked
</cfif>name=&quot;giftStyle&quot; value=6>
</td>
<td bgcolor=&quot;purple&quot; width=&quot;50&quot;>
<input type=&quot;radio&quot;
<cfif isDefined(&quot;form.giftStyle&quot;) AND form.giftStyle EQ &quot;7&quot;>checked
</cfif>name=&quot;giftStyle&quot; value=7>
</td>
<td width=&quot;50&quot;>&nbsp; </td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=2>
<table border=0 width=100%>
<tr>
<td valign=top width=&quot;150&quot;>
<input type=&quot;checkbox&quot;
<cfif isDefined(&quot;form.giftText&quot;) AND form.giftText NEQ &quot;&quot;>
checked</cfif> name=&quot;giftTexton&quot; value=&quot;yes&quot;>
<font size=2 face=arial>Gift Card Text</font> </td>
<td align=left>
<textarea cols=34 rows=5 name=&quot;giftText&quot;>
<cfif isDefined(&quot;form.giftText&quot;) AND form.giftText NEQ &quot;&quot;>
#form.giftText#</cfif>
</textarea>
</td>
</tr></cfoutput>
<cfoutput>
<input type=&quot;hidden&quot; name=&quot;cartweight&quot; value=&quot;#cartweight#&quot;>
<input type=&quot;hidden&quot; name=&quot;ndaPrice&quot; value=&quot;#ndaPrice#&quot;>
<input type=&quot;hidden&quot; name=&quot;sdaPrice&quot; value=&quot;#sdaPrice#&quot;>
<input type=&quot;hidden&quot; name=&quot;gndPrice&quot; value=&quot;#gndPrice#&quot;>
<input type=&quot;hidden&quot; name=&quot;total&quot; value=&quot;#total#&quot;>
</cfoutput>
<!---<cfoutput query=&quot;qGetOrderID&quot;>
<input type=&quot;hidden&quot; name=&quot;orderid&quot; value=&quot;#order_ID#&quot;>
</cfoutput>--->
<tr> <cfoutput>
<cfloop list=&quot;#dbfields#&quot; index=&quot;i&quot;>
<input type=&quot;hidden&quot; name=&quot;#i#&quot; value=&quot;#evaluate(i)#&quot;>
</cfloop>
<cfloop list=&quot;#dbfields2#&quot; index=&quot;i&quot;>
<input type=&quot;hidden&quot; name=&quot;#i#&quot; value=&quot;#evaluate(i)#&quot;>
</cfloop>
</cfoutput>
<td valign=top width=&quot;150&quot;>&nbsp; </td>
<td align=right> &nbsp; &nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
<font face=&quot;Arial, Helvetica, sans-serif&quot;>Edit Billing Info: </font>
<table border=0 width=100%>
<tr bgcolor=&quot;#51D89E&quot;>
<td colspan=2>
<div align=&quot;center&quot;><font face='arial' size=2><font color=&quot;#FFFFFF&quot; size=&quot;4&quot;>Bill
To</font></font></div>
</td>
</tr>
<cfoutput>
<tr>
<td><font face=&quot;arial&quot; size=&quot;1&quot; color=&quot;##FF0000&quot;><b>Firstname</b></font></td>
<td>
<cfinput type=&quot;Text&quot; name=&quot;firstname&quot;
message=&quot;Please Enter firstname&quot;
required=&quot;Yes&quot;
size=&quot;15&quot;
maxlength=&quot;25&quot;
value=&quot;#form.firstname#&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=&quot;1&quot; color=&quot;##FF0000&quot;><b>Lastname</b></font></td>
<td>
<cfinput type=&quot;Text&quot;
name=&quot;lastname&quot;
message=&quot;Please enter last name&quot;
required=&quot;Yes&quot;
size=&quot;15&quot;
maxlength=&quot;25&quot;
value=&quot;#form.lastname#&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=1><b><font color=&quot;##FF0000&quot;>Phone</font></b></font></td>
<td>
<cfinput type=&quot;Text&quot;
name=&quot;phone&quot;
message=&quot;Please enter billing phone with area code.&quot;
validate=&quot;telephone&quot;
required=&quot;Yes&quot;
size=&quot;15&quot;
maxlength=&quot;25&quot;
value=&quot;#form.phone#&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=1>Fax</font></td>
<td>
<input type=&quot;text&quot; name=&quot;fax&quot; size=&quot;15&quot; maxlength=&quot;25&quot;
<cfif isDefined(&quot;form.fax&quot;)>value=&quot;#form.fax#&quot;</cfif>>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=&quot;1&quot; color=&quot;##FF0000&quot;><b>Email</b></font></td>
<td>
<cfinput type=&quot;Text&quot;
name=&quot;email&quot;
message=&quot;Please enter billing email address&quot;
required=&quot;Yes&quot;
size=&quot;23&quot;
maxlength=&quot;35&quot;
value=&quot;#form.email#&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=&quot;1&quot; color=&quot;##FF0000&quot;><b>Address1</b></font></td>
<td>
<cfinput type=&quot;Text&quot;
name=&quot;address1&quot;
message=&quot;Please enter billing address.&quot;
required=&quot;Yes&quot;
size=&quot;15&quot;
maxlength=&quot;25&quot;
value=&quot;#form.address1#&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=1>Address2</font></td>
<td>
<input type=&quot;text&quot; name=&quot;address2&quot; size=&quot;15&quot; maxlength=&quot;25&quot;
<cfif isDefined(&quot;form.address2&quot;)>value=&quot;#form.address2#&quot;</cfif>>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=&quot;1&quot; color=&quot;##FF0000&quot;><b>City</b></font></td>
<td>
<cfinput type=&quot;Text&quot;
name=&quot;city&quot;
message=&quot;Please enter billing city.&quot;
required=&quot;Yes&quot;
size=&quot;15&quot;
maxlength=&quot;25&quot;
value=&quot;#form.city#&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=&quot;1&quot; color=&quot;##FF0000&quot;><b>State</b></font></td>
<td>
<cfinput type=&quot;Text&quot;
name=&quot;state&quot;
message=&quot;Please enter billing state.&quot;
required=&quot;Yes&quot;
size=&quot;2&quot;
maxlength=&quot;2&quot;
value=&quot;#form.state#&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=&quot;1&quot; color=&quot;##FF0000&quot;><b>Zip</b></font></td>
<td>
<cfinput type=&quot;Text&quot;
name=&quot;zip&quot;
message=&quot;Please enter billing ZIP code.&quot;
validate=&quot;zipcode&quot;
required=&quot;Yes&quot;
size=&quot;10&quot;
maxlength=&quot;10&quot;
value=&quot;#form.zip#&quot;>
</td>
</tr>
</cfoutput>
</table>
<font face=&quot;Arial, Helvetica, sans-serif&quot;>Edit Shipping Info.: </font>
<cfoutput>
<table border=0 width=100%>
<tr bgcolor=&quot;##51D89E&quot;>
<td colspan=&quot;2&quot;>
<div align=&quot;center&quot;><font face=&quot;arial&quot; size=&quot;4&quot; color=&quot;##FFFFFF&quot;>Ship
To</font> </div>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=1>Firstname</font></td>
<td>
<input type=&quot;text&quot; name=&quot;sfirstname&quot; size=&quot;15&quot;
<cfif isDefined(&quot;form.sfirstname&quot;)>value=&quot;#form.sfirstname#&quot;</cfif> maxlength=&quot;25&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=1>Lastname</font></td>
<td>
<input type=&quot;text&quot; name=&quot;slastname&quot; size=&quot;15&quot;
<cfif isDefined(&quot;form.slastname&quot;)>value=&quot;#form.slastname#&quot;</cfif> maxlength=&quot;25&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=1>Phone</font></td>
<td>
<input type=&quot;text&quot; name=&quot;sphone&quot; size=&quot;15&quot;
<cfif isDefined(&quot;form.sphone&quot;)>value=&quot;#form.sphone#&quot;</cfif> maxlength=&quot;25&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=1>Fax</font></td>
<td>
<input type=&quot;text&quot; name=&quot;sfax&quot; size=&quot;15&quot;
<cfif isDefined(&quot;form.sfax&quot;)>value=&quot;#form.sfax#&quot;</cfif> maxlength=&quot;25&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=1>Email</font></td>
<td>
<input type=&quot;text&quot; name=&quot;semail&quot; size=&quot;15&quot;
<cfif isDefined(&quot;form.semail&quot;)>value=&quot;#form.semail#&quot;</cfif> maxlength=&quot;35&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=&quot;1&quot; color=&quot;##FF0000&quot;><b>Address1</b></font></td>
<td>
<cfinput type=&quot;Text&quot;
name=&quot;saddress1&quot;
message=&quot;Please input a shipping address.&quot;
required=&quot;Yes&quot;
size=&quot;15&quot;
value=&quot;#form.saddress1#&quot;
maxlength=&quot;25&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=1>Address2</font></td>
<td>
<input type=&quot;text&quot; name=&quot;saddress2&quot; size=&quot;15&quot;
<cfif isDefined(&quot;form.saddress2&quot;)>value=&quot;#form.saddress2#&quot;</cfif> maxlength=&quot;25&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=&quot;1&quot; color=&quot;##FF0000&quot;><b>City</b></font></td>
<td>
<cfinput type=&quot;Text&quot;
name=&quot;scity&quot;
message=&quot;Please indicate city to ship to.&quot;
required=&quot;Yes&quot;
size=&quot;15&quot;
value=&quot;#form.scity#&quot;
maxlength=&quot;25&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=&quot;1&quot; color=&quot;##FF0000&quot;><b>State</b></font></td>
<td>
<cfinput type=&quot;Text&quot;
name=&quot;sstate&quot;
message=&quot;Please indicate state to ship to.&quot;
required=&quot;Yes&quot;
size=&quot;2&quot;
value=&quot;#form.sstate#&quot;
maxlength=&quot;2&quot;>
</td>
</tr>
<tr>
<td><font face=&quot;arial&quot; size=&quot;1&quot; color=&quot;##FF0000&quot;><b>Zip</b></font></td>
<td>
<cfinput type=&quot;Text&quot;
name=&quot;szip&quot;
message=&quot;Please indicate ZIP code to ship to.&quot;
validate=&quot;zipcode&quot;
required=&quot;Yes&quot;
size=&quot;15&quot;
value=&quot;#form.szip#&quot;
maxlength=&quot;25&quot;>
</td>
</tr>
</table>
</cfoutput>
<font face=&quot;Arial, Helvetica, sans-serif&quot;>Edit Credit Card Info:
</font><br>
<table width=&quot;100%&quot; border=&quot;0&quot;>
<tr bgcolor=&quot;#51D89E&quot;>
<td colspan=&quot;2&quot; valign=&quot;top&quot;>
<div align=&quot;center&quot;><font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;4&quot; color=&quot;#FFFFFF&quot;>Credit
Card Information: </font></div>
</td>
</tr>
<tr>
<td width=&quot;139&quot; valign=&quot;top&quot;><font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;2&quot;><b>Card
Type:</b></font></td>
<td width=&quot;131&quot;>
<input type=radio name=&quot;cardtype&quot;
<cfif form.cardtype EQ &quot;Visa&quot;>checked</cfif> value=Visa>
Visa<br>
<input type=radio name=&quot;cardtype&quot;
<cfif form.cardtype EQ &quot;MasterCard&quot;>checked</cfif> value=MasterCard>
MasterCard<br>
<input type=radio name=&quot;cardtype&quot;
<cfif form.cardtype EQ &quot;Discover&quot;>checked</cfif>value=Discover>
Discover </td>
</tr>
<tr>
<td width=&quot;139&quot;><b><font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;2&quot;>Card
No.:</font></b></td>
<td width=&quot;131&quot;>
<cfinput type=&quot;Text&quot;
name=&quot;x_Card_Num&quot;
value=&quot;#form.x_Card_Num#&quot;
message=&quot;Please enter valid credit card number.&quot;
validate=&quot;creditcard&quot;
required=&quot;Yes&quot;
size=&quot;16&quot;
maxlength=&quot;20&quot;>
</td>
</tr>
<tr>
<td width=&quot;139&quot;><font size=&quot;2&quot; face=&quot;Arial, Helvetica, sans-serif&quot;><b>Name
on Card:</b></font></td>
<td width=&quot;131&quot;>
<cfinput type=&quot;Text&quot;
name=&quot;cardname&quot;
value=&quot;#form.cardname#&quot;
message=&quot;Please enter name as it appears on card.&quot;
required=&quot;Yes&quot;
size=&quot;20&quot;
maxlength=&quot;30&quot;>
</td>
</tr>
<tr>
<td width=&quot;139&quot;><font size=&quot;2&quot; face=&quot;Arial, Helvetica, sans-serif&quot;><b>Exp.
Date (mm/yy):</b></font></td>
<td width=&quot;131&quot;>
<cfinput type=&quot;Text&quot;
name=&quot;x_Exp_Date&quot;
value=&quot;#form.x_Exp_Date#&quot;
message=&quot;Please enter expiration date as mm/yy.&quot;
required=&quot;Yes&quot;
size=&quot;5&quot;
maxlength=&quot;5&quot;>
</td>
</tr>
<tr>
<td width=&quot;139&quot;> <cfoutput>
<input type=&quot;hidden&quot; name=&quot;total&quot; value=&quot;#total#&quot;>
<input type=&quot;hidden&quot; name=&quot;cartweight&quot; value=&quot;#cartweight#&quot;>
<input type=&quot;submit&quot; name=&quot;Submit_Edits&quot; value=&quot;Submit_Edits&quot;>
</cfoutput> </td>
<td width=&quot;131&quot;>&nbsp;</td>
</tr>
</table>
</td>
</cfform>
<td width=&quot;25%&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;9%&quot;>&nbsp;</td>
<td width=&quot;25%&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;9%&quot;>&nbsp;</td>
<td width=&quot;25%&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;9%&quot;>&nbsp;</td>
<td width=&quot;25%&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;9%&quot;>&nbsp;</td>
<td width=&quot;66%&quot;>&nbsp;</td>
<td width=&quot;25%&quot;>&nbsp;</td>
</tr>
</table>
<br>

</td>
</tr>
</table>
</body>
</html>
 
If you comment out the following code, does it work?

<cfloop list=&quot;#dbfields#&quot; index=&quot;i&quot;>
[COLOR=000080][COLOR=FA5000]<input type=&quot;hidden&quot; name=&quot;#i#&quot; value=&quot;#evaluate(i)#&quot;>[/color][/color]
</cfloop>
<cfloop list=&quot;#dbfields2#&quot; index=&quot;i&quot;>
[COLOR=000080][COLOR=FA5000]<input type=&quot;hidden&quot; name=&quot;#i#&quot; value=&quot;#evaluate(i)#&quot;>[/color][/color]
</cfloop> - tleish
 
it works when I comment out that code (both times is occurs). Is the loop the problem?
 
What are the names and values of the dbfields query? - tleish
 
i not sure if this is what you mean but:

the names of db fields (as set on the top of the sample template above) are firstname,lastname,phone,fax,email,address1,address2,city,state,zip

the values are derived from a form several templates back (and seem to be passing fine as i diplayed one on the page just before the page with the error). The values i entered into the form this time through were:
firstname=test
lastname=DBFIELDS
phone=123-456-7890
fax=
email=myemail@mydomain.com
address1=1 Second Street
address2=
city=Milford
state=CT
zip=06460
 
I'm thinking somehow the #evaluate(i)# in the loop is causing the problem... Try temporarily removing them and see what happend. - tleish
 
I changed it from #evaluate(i)# to &quot;hi&quot; - same error. This is strange.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top