August 25th, 2003, 09:54 PM
passing array in hidden var
<cfloop collection="#session.cart#" item="i">
<input type="hidden" name="name" value="#name#">
currently I use the field to send to another page, but only prints once.
I think I need a cfloop or for loop but not sure how to implement
August 27th, 2003, 11:32 AM
One option is to dynamically name each hidden form field. Right now all of your form fileds would be named "name" which will screw things up.
Another option is to translate the array into XML using the CFWDDX tag, and then pass the WDDX-formatted string in the hidden form field. Then on the next page you can use CFWDDX again to translate the XML back into an array.
November 19th, 2003, 09:04 PM
You may also need to further format the WDDX using the ToBase64() function since the WDDX packet may not pass properly in a hidden form field.