XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).
Moderator: General Moderators
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Tue Nov 28, 2006 11:36 am
Ok so I have to use coldfusion right now for a bit. I am trying to make a form array thingy like this:
Code: Select all
<input type="checkbox" name="DelImage[]" value="#id#" />
well ok but now how do I loop though all of those and do something there? I have tried every variation of this:
Code: Select all
<cfloop item="NextId" collection="#Form.DelImage#">
//code here! #NextId# should be the value of that checkbox thingy.
</cfloop>
Can anyone help me please?
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Tue Nov 28, 2006 1:39 pm
screw it, coldfusion sucks
Burrito
Spockulator
Posts: 4715 Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah
Post
by Burrito » Tue Nov 28, 2006 3:42 pm
shiznatix wrote: screw it, coldfusion sucks
mmmhmm.
I don't know about the array thing, but I know that if you give the checkboxes the same name (without the []), it will pass all that are checked as a comma separated list. you could then split that list and <cfloop> over the list to do what you want.