Solved

value of variable

Posted on 2000-04-14
6
152 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Expert Comment

by:JKevin
ID: 2716241
<cfinput type="text" name="#FORM.id#">

will work
0
 

Expert Comment

by:pganeshan
ID: 2718469

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
ID: 2718474
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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

Accepted Solution

by:
ssoni earned 100 total points
ID: 2719150
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
ID: 2722640
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
ID: 2722647
Oh.. and I didn't know the SOP.  Sorry for posting my first reply as an answer.

-JKC
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
What You Need to Know when Searching for a Webhost Provider

751 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