-
oparada1120Asked on September 19, 2016 at 11:42 PM
Hey Support!
Hope all is well! Here what I'm trying to achieve...
I'm putting together an order form with a Total field at the end. An order is placed with an item and quantity and the Total field is populated with the total amount. Now I have the option to add an additional order and when the user selects an additional item and adds the quantity I want to be able to add onto the value that's already in the Total field with the additional value from the extra item that is being added. I can't seem to get the math right.
Please let me know if this makes any sense and thank you in advance!Page URL: https://form.jotform.com/62583366803158 -
Chriistian Jotform SupportReplied on September 20, 2016 at 1:24 AM
I believe we can achieve your requirement by replacing your current Total textbox field with a Form Calculation Widget instead. Please follow the steps below:
1. Add the form calculation widget to your form.
2. Now add all the Meal dropdown and Quantity fields required for calculating the Total price. Here's a guide on How to Perform Calculation in the Form? The final formula should look something like the one below:
3. It looks like you have already added calculation values for the first and second dropdown fields, however, the third and fourth do not. So we will now need to add calculation values to the 3rd and 4th dropdown. Click the gear icon of the Select Your Meal dropdown then add the Calculation values on the Survey tab.
4. Once you have added the calculation values to the third and fourth dropdown, you're all set. You just need to delete the Update/Calculation conditions since we already have a calculation formula so will no longer need that.
You can check out this demo form and clone it to your account for further testing: https://form.jotform.com/62630650491958.
If you need further assistance, please let us know.
Regards. -
oparada1120Replied on November 1, 2016 at 11:25 AM
Hey Christian,
Thank you so much and I apologize for the massive delay in getting back to you. Your recommendation seems to have done the trick here but now I’m noticing another little issue. Whenever the amount ends in a ‘0’ it doesn’t display properly. So instead of the total amount displaying as “42.10” it displays as “42.1”.
Any way to get around that? I’ve check some settings and can’t seem to find any that could help me out.
Many, many thanks!
Oscar -
Welvin Support Team LeadReplied on November 1, 2016 at 1:33 PM
In the calculation configuration, make sure to check show empty decimal and make sure to select 2 from the dropdown:
Here's a test form showing the empty decimal: https://form.jotform.com/63055701662957.
-
oparada1120Replied on November 1, 2016 at 6:59 PM
Welvin,
Looks like that did it! I had accessed those options earlier but did not check Show empty decimal places.
Many, many thanks!!
Oscar