SunQuest
           ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old March 14th, 2005, 03:09 PM
jdang jdang is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Location: OC, CA
Posts: 49 jdang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 15 m
Reputation Power: 4
CF concat variable w/ a variable?

Hi,

I have a form w/ inputs like dr, patient, drug, direction
to print prescription labels. Making 1 label is simple. However, I want to let the users specify how many labels they want to make so that they may print it on 1 page.

I was thinking setting a varible called Count and let the user set that variable.

then loop from 1 to count
display 'Count' # of forms so they can fill out, then print out. The thing I'm having problem with is how do I make the form variable's name change? like name1, dr1, patient1 and so on?
I tried to concat but using name.Count doesn't work and google didn't really help, searching concat in this forum returned nothing. So I need to be able to do this


name1<input .......
dr1 <input .....
patient1 <input .

name2<input .....
dr2<input .......
patient2<input .......

output
name
for Nth times specified by the users. Any tips? Thanks

Reply With Quote
  #2  
Old March 14th, 2005, 04:00 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,618 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 9 h 44 m 33 sec
Reputation Power: 53
I can't tell if you mean the form field name, or the form variable name. If you mean the field name you could do:

<input type="text" value="name#i#">

If you mean the variable name itself, you could do:

<cfoutput>
#form['name#i#']#
</cfoutput>
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old March 14th, 2005, 05:24 PM
jdang jdang is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Location: OC, CA
Posts: 49 jdang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 15 m
Reputation Power: 4
Smile

it's the variable name that I was looking to do, will give that a try, thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > CF concat variable w/ a variable?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway