JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
How to calculate a cost based on a number of days attendance selectedAsked by simmsy21 on April 17, 2015 at 02:19 PM
Hi there. I have a form that needs to calculate a cost based on a number of days attendance selected. It's based on a number of conditions, this totals the number of days selected and works out the cost (1 day is £7, 2 days is £14 up to 5 days, but this has a discount and is £33 not £35).
It all works well when 1, 2 or 3 days are selected but not when 4 or 5 are. I have to click in and out of another field (the ' Total number of days selected:' field) for then it to work properly (ie i know the calculation works, it's just not refreshing until i select another field).
Can you advise please?
If this doesn't make sense, please let me know and i'll explain more. the Jotform is stated below.
form calculation Properly JotForm selected select
Could you please check this cloned version of your form: http://form.jotformpro.com/form/51065749146964 and let us know if this is how the calculation should work?
I've added another field to calculate the amount that needs to be paid based on this description and then used the calculation tool to add the 4% fee for the transaction.
If this works as expected, feel free to clone this form to your account so you can inspect it further. If not, please let us know how it should work so we can make the necessary adjustments.
Hi there. Thank you so much, this works perfectly now. Can you please advise what's changed so that i can learn from this.
After inspecting both forms I found what are differences between the forms. My colleague in his form did following:
1. He added one more field that is hidden to calculate the amount that needs to be paid based on this description and then used the calculation tool to add the 4% fee for the transaction.
2. Few conditions were changed in order to achieve good calculations.
- Conditions on field Total number of days were changed:
Those changed conditions are applied to new field 'Total'
- Calculation in Calculations Widget was changed:
Hope this will help. Let us know if you need further assistance.
thank you so much for your help, it's very much appreciated!
Feel free to contact us if you have any other questions.