Solved

value of variable

Posted on 2000-04-14
6
147 Views
Last Modified: 2013-12-24
For an application i'm using dynamically generated Text fields
<cfoutput query...>
<cfinput type="text" name="#id#">
In the action page of this form.
I want value of the text fields

i.e i want the value of #form.#id##(????????).
I tried Evaluate but its not working....


RASAP
0
Comment
Question by:swapg
6 Comments
 

Expert Comment

by:JKevin
Comment Utility
<cfinput type="text" name="#FORM.id#">

will work
0
 

Expert Comment

by:pganeshan
Comment Utility

JKevin,
Thanks for ur Suggestion, but this won't solve my problem.

I think u have interpreted it wrongly.
As i have to define <cfinput...
in the form page with dynamic names for the text fields as it is used in the Query output & read them in action page.

I hope i'm clear now.

0
 

Author Comment

by:swapg
Comment Utility
JKevin,
Thanks for ur Suggestion, but this won't solve my problem.

I think u have interpreted it wrongly.
As i have to define <cfinput...
in the form page with dynamic names for the text fields as it is used in the Query output & read them in action page.

I hope i'm clear now.

0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Accepted Solution

by:
ssoni earned 100 total points
Comment Utility
Two possible scenarios:

If you can generate the same query on the action page u can re-generate the names there.

In your first page make the input field names a little more predictable for example u can have

<cfinput type="text" name="text_#id#">

Now on the action page u loop through the FORM collection and look for all variable names matching "text_". That way u can achieve it.

Hope this helps.

Soni.
0
 

Expert Comment

by:JKevin
Comment Utility
Oh, I get it now.

I've done this before in two ways.  

Either with JavaScript which generates the form using variables supplied by the CF server (this is the more complicated solution, but more flexible)

OR

Totally with CF using lists.  Create a list (dynamic of course).  Each item in the list is a new text field name.
To retrieve the value of the form field, loop over the list. This is similar to Soni's solution except it stores the filed names in an explicit list that you can manipulate more easily than the FORMS collection. (ie you don't need to search the collection for specific types of filed names)
the downside is that you have to create and manage the list.
0
 

Expert Comment

by:JKevin
Comment Utility
Oh.. and I didn't know the SOP.  Sorry for posting my first reply as an answer.

-JKC
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now