Solved

value of variable

Posted on 2000-04-14
6
148 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
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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

864 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

20 Experts available now in Live!

Get 1:1 Help Now