?
Solved

Referring to a variable as a String

Posted on 2000-05-17
4
Medium Priority
?
148 Views
Last Modified: 2013-12-24
I have a form that consists of a dynamically-generated set of form fields. Thus, I have fields of unknown nmae coming into my form-processing page.  (they're identified with an ID number).  

How can I get the value of these form fields, if I can't hardcode the names of the fields ahead of time?

e.g. several sets of radio buttons are created, each set having a unique name identifier.  I can know the names of them coming in via hidden form fields generated later, but I can't access the values of the fields, since I can't refer to FORM.#myval# or something like that....
0
Comment
Question by:IsleOfView
[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
  • 3
4 Comments
 

Author Comment

by:IsleOfView
ID: 2818182
Adjusted points from 200 to 300
0
 

Author Comment

by:IsleOfView
ID: 2818183
Increased points to 300...

Maybe if I just had the query string, I could get what I needed....how can I get that?  (This is a result of a POST operation)
0
 
LVL 2

Accepted Solution

by:
paulkd earned 1200 total points
ID: 2818443
Use the Form.FormField field which is passed from all forms....

Insert this code on your action page

<CFIF ISDefined("Form.Fieldnames")>
  <table border="1">
    <CFOUTPUT>
      <CFLOOP Index="FieldName" List="#Form.Fieldnames#">
        <td>Form.#FieldName#</td> <td>#Evaluate(FieldName)#&nbsp;</td></tr>
      </CFLOOP>
    </CFOUTPUT>
  </table>
</CFIF>

Note: that radio buttons and checkboxes will not return a field if they are not selected/checked, so have a default radio button checked.
0
 

Author Comment

by:IsleOfView
ID: 2818846
Thanks....that worked great--enjoy the points...I needed a fast answer!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 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