Solved

creating table rows with form variables.

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 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

23 Experts available now in Live!

Get 1:1 Help Now