creating order form page

S

shank

I need advice on how to get started with this project. I want a page where a
user can manually enter an order. Our users know our order# system and it's
much easier to manually enter items as opposed to using a shopping cart and
flipping through multiple pages.

On the page would be the following....
1) Billing address
2) shipping address
3) fields for order numbers

Billing and shipping seem pretty straight forward.

Because I have no idea of how many products a customer will order, I'm
picturing a new order# field being created when one is filled out. How do I
do this?

Then, assuming I get all these dynamically generated fields, how do I get
them into an OrderDetails table? The fields are dynamically generated.

Can someone give me a clue or samples?
thanks!
 
R

Rob Meade

...
Because I have no idea of how many products a customer will order, I'm
picturing a new order# field being created when one is filled out. How do I
do this?

I'm picturing this in my head...

One initial row that has the relevant fields and at the end an 'Add Item'
button.

This would then run some javascript to add a new 'row' with the fields in
again beneath, again the user enters the items, clicks 'Add Item' and
another empty row is inserted.

You would need another button at the bottom obviously to complete the order,
and by naming all of the relevant columns/fields correctly (ie,
ProductNumber (for example) would be called ProductNumber on every row,
Quantity would be called Quantity on every row) you would get the form
results passed like this:

(product number fields) -

1102, 1103, 1104

(quantity fields)

1, 5, 6

examples etc...

You then simply throw it all into arrays and pair them up after running any
validation etc.

There should be lots of examples on many Javascript sites for doing this,
here's just one link that I found from a quick Google search :

http://www-level3.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20706174.html

(scroll down to the accepted answer)
Then, assuming I get all these dynamically generated fields, how do I get
them into an OrderDetails table? The fields are dynamically generated.

You mean the fields in your database are generated dynamically?

Regards

Rob
 

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

No members online now.

Forum statistics

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

Latest Threads

Top