By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.