Something bothers me about your code below... <tr>#form.vendor_id5#<td>#form.nvc_id5#</td></tr>
Shouldn't there be a <td> after the <tr> Anyway, you could do the same thing like so... <cfoutput> <cfloop from="4" to="49" index="x"> <tr><td>#form['vendor_id' & x]#</td><td>#form['nvc_id' & x]#</td></tr> </cfloop> </cfoutput> Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -----Original Message----- From: patrick buch [mailto:patrick.b...@verizon.com] Sent: Wednesday, September 23, 2009 9:59 AM To: cf-talk Subject: Form Output Iteration/Looping Question Hi, Thank you for taking a minute to look at my post... In the form output section below, I'm wondering how to dynamically add the number at the end of the id (form.vendor_id* & form.nvc_id*). I should be able to loop and dynamically create the output section below instead of hardcoding the numbers like I have. The ID numbera (4-19) represents the recordkey in the db. ***** FORM INPUT ***** <input type="hidden" id="vendor_id" name="vendor_id#recordkey#" value="<td>#vendor#</td><td>#item_id#</td><td>#description#</td>"> <cfinput type="Text" name="nvc_id#recordkey#" maxlength="100" required="yes" size="3"> ***** FORM OUTPUT ***** <cfelseif form.ID eq "ont_count"> <tr><td>Plant: </td><td>#form.plant#</td></tr> <tr>#form.vendor_id4#<td>#form.nvc_id4#</td></tr> <tr>#form.vendor_id5#<td>#form.nvc_id5#</td></tr> <tr>#form.vendor_id6#<td>#form.nvc_id6#</td></tr> <tr>#form.vendor_id7#<td>#form.nvc_id7#</td></tr> <tr>#form.vendor_id8#<td>#form.nvc_id8#</td></tr> <tr>#form.vendor_id9#<td>#form.nvc_id9#</td></tr> <tr>#form.vendor_id10#<td>#form.nvc_id10#</td></tr> <tr>#form.vendor_id11#<td>#form.nvc_id11#</td></tr> <tr>#form.vendor_id12#<td>#form.nvc_id12#</td></tr> <tr>#form.vendor_id13#<td>#form.nvc_id13#</td></tr> <tr>#form.vendor_id14#<td>#form.nvc_id14#</td></tr> <tr>#form.vendor_id15#<td>#form.nvc_id15#</td></tr> <tr>#form.vendor_id16#<td>#form.nvc_id16#</td></tr> <tr>#form.vendor_id17#<td>#form.nvc_id17#</td></tr> <tr>#form.vendor_id18#<td>#form.nvc_id18#</td></tr> <tr>#form.vendor_id19#<td>#form.nvc_id19#</td></tr> </cfif> Hope you have all the info you need. If you have any questions, please ask. Thank you again for looking at this post. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326538 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4