Working with Form Array's in Coldfusion?

Posted by Jakub on Stack Overflow See other posts from Stack Overflow or by Jakub
Published on 2010-05-27T19:12:12Z Indexed on 2010/05/27 19:31 UTC
Read the original article Hit count: 184

I have no idea how to handle this in coldfusion 9, I have a form being submitted (POST) with element checkboxes, called items[].

When I do a <cfdump var="#form#" /> no-problem, I get all the items shown with the proper names like items[] eg:

struct 
ITEMS[] 13,14  
FIELDNAMES ITEMS[] 

however doing a <cfdump var="#form.items[]#" /> results in an error. How do I access the CF9 field values? Somehow loop through it?

I cannot seem to do anything with the array to get the id's out of it? Thoughts, I'm kindof stumped and coldfusion isn't the easiest language to find examples / references on the net ;)

Is there a correct way to deal with this? I need to get the ID's out of there so I can referenc what lines were checked in the form, so I can follow up with an action.

Thanks!

© Stack Overflow or respective owner

Related posts about html

Related posts about arrays