Is it possible to change the request order of fields on a form?

T

Tim Chmielewski

For an auto-generated form I have the following order of fields:
savevalues
userid
productcode
PrintColour1_1 Colour1_1 Quantity_1
" " " "
" " " "
PrintColour1_5 Colour1_5 Quantity_5


I was hoping to get them from the request object by rows, but they come
out as the following (example values included):
savevalues = yes
userid = 4029
productcode = 46BN
PrintColour1_1 = Black
PrintColour1_2 =
PrintColour1_3 =
PrintColour1_4 =
PrintColour1_5 =
Colour1_1 = Red
Colour1_2 =
Colour1_3 =
Colour1_4 =
Colour1_5 =
Quantity_1 = 5
Quantity_2 =
Quantity_3 =
Quantity_4 =
Quantity_5 =

Is there any way of changing this order as I think it may make it easier
to process the fields (which can change according to what the original
form fields are.)

Thanks.
 
T

Tim Chmielewski

How are you getting the info from the database?
Selected products have a flag on their record that signifies they require
extra fields on the order for more information.

The names of these extra fields are stored in a seperate table that is
looped through to build a unique form that has the input fields required
for that product.

When I work out how to get the fields from the Request.Form object I will
loop through the "Extra fields" table to build an INSERT query that will
insert the data into another table (which has all possible fields that
are required.)

Thanks.
 
J

Jeff Cochran

Selected products have a flag on their record that signifies they require
extra fields on the order for more information.

The names of these extra fields are stored in a seperate table that is
looped through to build a unique form that has the input fields required
for that product.

When I work out how to get the fields from the Request.Form object I will
loop through the "Extra fields" table to build an INSERT query that will
insert the data into another table (which has all possible fields that
are required.)

Name your fields and build your query based on the names.

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top