> I'm trying to figure out this structure thing, and I have a 
> project where I have to grab all the fieldname/value pairs 
> from one form, hold them while the user fills out a second page, 
> then send them along in a hidden field to the action page.
> 
> What's the best way to do this? I thought I could just do 
> something like: <input type="hidden" name="page1struct"
> value="#structcopy(form.fieldnames)#"> But that throws an error.

That's not going to work, because a structure can't be simply written to a
string, as you're trying to do. If you want to pass data from one page, to
the next, it'll have to be string data of some type. You could use WDDX to
convert complex objects (arrays, structures, queries) to strings, then write
the WDDX strings to your form fields, then convert them back to complex
objects using CFWDDX in the action page. Or, you could use the Session scope
to store the data persistently.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to