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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multipule Check Boxes for dynamic records. 1

Status
Not open for further replies.

jstreich

Programmer
Apr 20, 2002
1,067
US
I have a database that is being populated by people filling out a public form. The admin screen will list rows of forms filled out with a check-box before each one. What I want to happen is the admin-user to be able to select multipule records using the check boxes and then click on a button to perform the same action to the selected check-box.

If there was an upper bound, I would be able to use dynamically created/named variables, but because there is no logical upper bound, I'd like to pass them as an array or other data structure. I can't seen to get this to work in Coldfusion, any ideas would be appreciated.

[plug=shameless]
[/plug]
 
Not quite sure what you mean about the upper bound stuff, but if you have something like this

Code:
<!--- say my_query contains 1,2,3 in field1 and a,b,c in field2 --->
<cfloop query="my_query">
  <input type="checkbox" name="something" value="#my_query.field1#" />#my_query.field2#<br />
</cfloop>

within your form and you selected option a and c the values 1 and 3 would be passed to the next page as a comma delimeted list of values within a variable called "somthing"

then to get the information you can loop over the data as if it were a list like this:

Code:
<cfoutput>
  <cfloop list="#Form.something#" index="i">
    #i#<br />
  </cfloop>
</cfoutput>

Hope this helps!

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top