Solved

creating table rows with form variables.

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IPA - can it be run on a web server? 3 227
DNS, website, godaddy 6 95
Ubuntu Apache Webserver - File Permissions 5 76
Company website 6 49
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…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

733 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