30-10-2007, 09:27 | #1 |
The Last Airbender
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
|
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 |
30-10-2007, 09:45 | #2 |
Chef extraordinaire
Join Date: Jul 2006
Location: Infinite Loop
Posts: 11,143
|
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. |
30-10-2007, 10:29 | #3 |
The Last Airbender
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
|
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. |
30-10-2007, 10:44 | #4 |
Chef extraordinaire
Join Date: Jul 2006
Location: Infinite Loop
Posts: 11,143
|
so there will only ever be 7 rows on the page?
__________________
"Dr Sheldon Cooper FTW!" |
30-10-2007, 10:57 | #5 |
The Last Airbender
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
|
At the moment, I think so. Is it difficult to add more at a later date?
|
30-10-2007, 11:11 | #6 |
Chef extraordinaire
Join Date: Jul 2006
Location: Infinite Loop
Posts: 11,143
|
nope not at all
__________________
"Dr Sheldon Cooper FTW!" |
30-10-2007, 11:21 | #7 |
The Last Airbender
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
|
Cool. So where do I go from here?
|
30-10-2007, 12:37 | #9 |
The Last Airbender
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
|
Fook me. I'm gonna be a week trying to sort all that out
|
30-10-2007, 12:49 | #10 |
Chef extraordinaire
Join Date: Jul 2006
Location: Infinite Loop
Posts: 11,143
|
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!" |