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
Solved

creating table rows with form variables.

Posted on 2002-07-09
2
146 Views
Last Modified: 2013-12-24
this is probably real easy.

I am trying to develop a form that would allow my user to define how many rows the next page will have.

example:

user inputs usual infomation (first name, last name, address, etc...)

now this person is also going to register other people on the same card, check, moneyorder.....

I will give them an option to check like

are you registering other people ..?  Yes No (radio btn,default no)

once the user checks the radio btn (yes) then they will have to put a value in another field (colums/people)

let say they put 10.

hence the next page(form action would) would now show a table with 10 rows and 2 colums:

first name: (text field)            Last name:(textfield)
first name: (text field)            Last name:(textfield)
first name: (text field)            Last name:(textfield)
first name: (text field)            Last name:(textfield)
first name: (text field)            Last name:(textfield)
first name: (text field)            Last name:(textfield)
first name: (text field)            Last name:(textfield)
first name: (text field)            Last name:(textfield)
first name: (text field)            Last name:(textfield)
first name: (text field)            Last name:(textfield)
                        (submit Btn2)
this will allow the user to register 10 more people under prefered payment method.


please help...











0
Comment
Question by:jriver12
2 Comments
 
LVL 3

Accepted Solution

by:
SewellM earned 200 total points
ID: 7141600
Try this.  They have selected the number of extra fields on the page.  This form field was named otherPeople.  When the form submits, it send the value of this form field.  The second page should look similar to this:

<form>
<cfoutput>
<cfloop index="theCnt" from="1" to="#form.otherPeople#" step="1">
first name: <input type="text" name="othPplFirst#theCnt#">  Last name: <input type="text" name="othPplLast#theCnt#">  <br>
</cfloop>
</cfoutput>
<input type="submit" name="Submit" value="Submit">
</form>

This should display a row for the number selected on the previous page and each form element will be named differently.

Michael
0
 

Author Comment

by:jriver12
ID: 7143105
Michael

after putting more thought into my issue I luckily came up with the same solution.

thanks for you time.
its appreciated.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

838 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