473,397 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

write jsp /php form so user can control ho many input fields

Hi,

I currently have an html form with which I gather the same information
for 5 items, and then post all the data for processing to a jsp file. I
would like to make a form (using jsp or php) that allows the user to
choose how many items they would like to compare (1 through 5) , and
then have the form change to list the appropriate set(s) of form entry
fields, with each field's variable appropriately named uniquely (e.g.
at present I have Color1, Color2, Color3, Color4, Color5 all as
variables submitted via my form, I would like this naming convention to
continue).

In other words, if the user chooses to only compare 3 items, I would
like for only 3 sets of entry fields to be presented, for each of which
the field names would be fieldname1, fieldname2, fieldname3.

To accomodate the java class file I am sending the data to for
processing, I would also like the code to pass zero values for the
fields not chosen. In other words, if only 3 items are chosen, the
values that would have been submitted for items 4 and 5 are submitted
as zeros.

Any help that can be provided would be greatly appreicated. A
solutionin either jsp or php would be fine.

Best wishes,

George Hadley
ghadley...@yahoo.com

Jan 3 '06 #1
2 1281
On 2006-01-03, gh********@yahoo.com <gh********@yahoo.com> wrote:
To accomodate the java class file I am sending the data to for
processing, I would also like the code to pass zero values for the
fields not chosen. In other words, if only 3 items are chosen, the
values that would have been submitted for items 4 and 5 are submitted
as zeros.


put all the filelds in the form but make the ones you don't want the user
to see hidden.

<input type="hidden" ...

Bye.
Jasen
Jan 3 '06 #2
gh********@yahoo.com wrote:
Any help that can be provided would be greatly appreicated. A
solutionin either jsp or php would be fine.


Both are off topic here. Especially, JSP is JavaServer Pages (not, as you
may have thought, JavaScript Pages), and Java != J(ava)Script/ECMAScript.
Try any newsgroup of comp.lang.java.* or comp.lang.php instead.
PointedEars
Jan 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: JDS | last post by:
Hi, all. I'd like to do the following, preferably *without* resorting to JavaScript: I have a long, dynamically-generated form questionnaire. Not all of the form fields are dynamically...
3
by: Anonymous | last post by:
Hi all, I have a form people use to enter checking data. One of the fields is calculated based on finding the difference of two input fields on the form. Here are the fields: CheckAmount...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
0
by: Benjamin Bittner | last post by:
Hallo NG, ive searched a lot in some google groups, and found many threads, but nothing that helped me. Here is the scenario: I have an aspx page which loads a user control in page.onInit like...
2
by: dath | last post by:
Hi, Searched the forum and found a lot on passing form input to aquery but not the other way around. Here is the situation: I have a timesheet form based on a subform query that asks the...
11
by: Rik | last post by:
Hello guys, now that I'm that I'm working on my first major 'open' forms (with uncontrolled users I mean, not a secure backend-interface), I'd like to add a lot of possibilities to check wether...
4
by: Rolf Rosenquist | last post by:
From a page with a form I collect the fields in the next page. The fields are compared with a database and if a certain condition does not fit, I want to go back to the first page with the form,...
11
by: newbie | last post by:
i have a form in which a hidden field (initial value as '0', and my javascript set it to '1' when an event is trigged). In the same form, i have a reset field. But I realized that the hidden field...
4
by: Ronald Raygun | last post by:
I have a form on an HTML page with the usual user name, email etc. I want to be able to display a popup window (callout?) when a text input control element is clicked. For example, for the form:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.