Boat Drinks  

Go Back   Boat Drinks > General > Computer and Consoles

Reply
 
Thread Tools Display Modes
Old 30-10-2007, 09:27   #1
Desmo
The Last Airbender
 
Desmo's Avatar
 
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
Default How easy is a dynamic web form?

OK, I've got most of my form set up, but thought I could add a little feature (although it's not 100% necessary so if it's too much work, I don't NEED it).

I've got a list of say 5 products. Customer type in how many of each they want. Form knows how much each item costs and adds up a total into another field. This field is then sent as part of the data on the web form.

e.g. Customer fills in red fields on form. Form works out blue field. Both red and blue field values are sent with the form.

Product 1 : 2 @ £10
Product 2 : 0 @ £10
Product 3 : 1 @ £15

Total : £35


So, is it easy enough? I don't mind sorting this myself if you can point me in the right direction for a guide
Desmo is offline   Reply With Quote
Old 30-10-2007, 09:45   #2
leowyatt
Chef extraordinaire
 
leowyatt's Avatar
 
Join Date: Jul 2006
Location: Infinite Loop
Posts: 11,143
Default

bit of javascript should do that no problem

ideally I'd make the 10, 10 & 15 readonly and auto populate. Actually how many product fields is the customer going to fill in?
__________________
"Dr Sheldon Cooper FTW!"

Last edited by leowyatt; 30-10-2007 at 09:48.
leowyatt is offline   Reply With Quote
Old 30-10-2007, 10:29   #3
Desmo
The Last Airbender
 
Desmo's Avatar
 
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
Default

Yep, the price fields will be fixed so they can be read only. There will be the following products...

Business Card
Letterhead
Compliment Slip
Stationery Pack
Artwork Level 1
Artwork Level 2
Artwork Level 3

...they will all have their own fixed prices. I just need the customer to type in an amount next to the product required. This will then give a total which, along with the amounts for the products, gets sent in the form.
Desmo is offline   Reply With Quote
Old 30-10-2007, 10:44   #4
leowyatt
Chef extraordinaire
 
leowyatt's Avatar
 
Join Date: Jul 2006
Location: Infinite Loop
Posts: 11,143
Default

so there will only ever be 7 rows on the page?
__________________
"Dr Sheldon Cooper FTW!"
leowyatt is offline   Reply With Quote
Old 30-10-2007, 10:57   #5
Desmo
The Last Airbender
 
Desmo's Avatar
 
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
Default

At the moment, I think so. Is it difficult to add more at a later date?
Desmo is offline   Reply With Quote
Old 30-10-2007, 11:11   #6
leowyatt
Chef extraordinaire
 
leowyatt's Avatar
 
Join Date: Jul 2006
Location: Infinite Loop
Posts: 11,143
Default

nope not at all
__________________
"Dr Sheldon Cooper FTW!"
leowyatt is offline   Reply With Quote
Old 30-10-2007, 11:21   #7
Desmo
The Last Airbender
 
Desmo's Avatar
 
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
Default

Cool. So where do I go from here?
Desmo is offline   Reply With Quote
Old 30-10-2007, 11:42   #8
leowyatt
Chef extraordinaire
 
leowyatt's Avatar
 
Join Date: Jul 2006
Location: Infinite Loop
Posts: 11,143
Default

This should point you in the right direction
__________________
"Dr Sheldon Cooper FTW!"
leowyatt is offline   Reply With Quote
Old 30-10-2007, 12:37   #9
Desmo
The Last Airbender
 
Desmo's Avatar
 
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
Default

Fook me. I'm gonna be a week trying to sort all that out
Desmo is offline   Reply With Quote
Old 30-10-2007, 12:49   #10
leowyatt
Chef extraordinaire
 
leowyatt's Avatar
 
Join Date: Jul 2006
Location: Infinite Loop
Posts: 11,143
Default

nah you aren't honestly it's not a big thing, once you've got your form, you just need to write one function that adds up all the stuff and just make that a onchange call on each text field
__________________
"Dr Sheldon Cooper FTW!"
leowyatt is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 19:47.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.