PHP add up total before submitting form
Posted on 2014-07-25
I'm not 100% sure how to ask this so please stick with me.
I have a wordpress / Woocommerce installation. The shopping cart has a single product that have a bunch of variations. I have had to create a function to add up all of the variations. Woocommerce deals in whole dollars and does not do many calculations with percentages.
With that said, depending on what a person enters into all of the input fields, the price can be different. I use a php function to calculate the price. However, Is there a way to run a form with processing it? Meaning, I want to run the form so I can see the totals be added up but I don't want to submit it. Does that make sense?