By jjjames on
I am creating on online catering form for people to place catering orders. Some fields include "Chicken" "Steak" "Rice" "Soda". I wan't users to be able to specify how many "Chickens" "Steaks" "Rice" and "Soda" they want for their catering order.
So if Chicken is $3, Steak is $4, Rice is $2 and Soda is $2...if they choose "3 Chickens, 1 Steak, 1 Rice, and 3 Sodas" the total should be: $21. How do I calculate the totals on the fly?
I would like a LIVE calculator based on the quantity they enter so that they can get a total on the fly.
What is the best way to do this? Also, how would I create a view that displays the totals of each form submitted?
Thanks!
Comments
This might
This might work:
http://drupal.org/project/computed_field
Thanks will look into it more
Thanks will look into it more :)
It does add the fields, but
It does add the fields, but the results aren't visible until I save. Is there a way to get a live preview?
solution?
Hi James,
More than 1 year after, did you find a solution?
I have the same problem you had.
Regards, Elian.
Hello- Some custom jquery was
Hello-
Some custom jquery was written to show the total in real-time. It's been a while and don't really know how it worked. Let me know if you want me to dig deeper and try to figure out how it was done.
cya
I would be interested
I am interested in how you achieved this if you can dig this up.
Thanks!
Here's the script that was
Here's the script that was pulling values from different webform fields and calculating them on the fly:
The totals will be shown in this div:
It doesnt with referenced
FYI: Computed_filed doesnt work with referenced fields