Solved

creating table rows with form variables.

Posted on 2002-07-09
2
144 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

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.

Question has a verified solution.

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

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

863 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