I want to create a complex order form that has 10-15 products. Each product has the option to choose the size (A) and quantity(B). Depending on the person’s choice a value is calculated presented (C). I then need all the products final values (C) to add up and display in box at the bottom of the page (D)
I’ve managed to find great solutions for the A+B=C, but I just can get one that then adds up all the C values.
Is there a simple Javascript solution for this problem?
The standard technique is for each change of A or B to trigger a calculation method. That calculation method works out C, and then triggers a method to total up the values.
How that’s done depends on how the page is structured, and on the code that you currently have.
That is along the lines of what I was thinking. The reason I didn’t post my code is because I couldn’t find any solutions that seemed straightforward so I wanted to find a viable solution before even putting together the page, especially since I’m not that well versed in Javascript and was scared to build on badly written code.
Any suggestion on the best way to approach this problem from the beginning?