By legofriek1986 on
Hello,
I'm new to drupal so may be this is a stupid question.
I'm making a webfrom for our new website in drupal where people can order something. Their can choose between 3 items but order them multiple times. I want to calculate the total amout of the price base on the order of items the costumer makes.
At the end the costumer sees the total amout.
How do I do it?
Greetings,
Christophe
Comments
As with most things there are
As with most things there are multiple ways to do what you're asking. I'd checkout the Webform Calculator module (https://drupal.org/project/webform_calculator). I've personally never used it but it seems like it should be able to handle your situation.
You could also write a small custom module to handle this situation. You can edit your webform using the hook_form_alter and then do your math on the various fields. I found a good post on this here - http://www.r2marketing.nl/blog/calculate-fields-webform-drupal
Hope that helps.
Jeff