How to calculate total cost based on number of nights with weekly discount

  • JS2706
    Asked on September 19, 2016 at 1:46 PM

    How would I calculate the cost ($35/night) based on total number of nights, which is fixed until the 7th night, and then there's a discount. There is an additional $10 discount after every 7 nights... so for example, 3 nights would be $105, 9 nights would be $305, and 15 nights would be $505.

     

    I would also like to add in other fields to this number, but not sure how to do it from a drop down menu with many different choices.

     

    Any help would be greatly appreciated!

  • Mike
    Replied on September 19, 2016 at 4:06 PM

    This is possible with calculation features at JotForm.

    Here is an example:

    - Total number of nights added with a Number field.

    How to calculate total cost based on number of nights with weekly discount Image 1 Screenshot 60

    - Two Form Calculation fields to implement the calculation.

    How to calculate total cost based on number of nights with weekly discount Image 2 Screenshot 71

    - Calculated number of weeks is calculated with a floor calculation function

    How to calculate total cost based on number of nights with weekly discount Image 3 Screenshot 82

    - Total calculation formula.

    How to calculate total cost based on number of nights with weekly discount Image 4 Screenshot 93

    Result:

    https://form.jotform.com/62626271671962

    You can clone the form to your account to check the back end.

    If you would like to add some value from the dropdown.

    - Add a dropdown field.

    Assign Calculation Value to the DropDown Options.

    - Include your dropdown to the calculation formula.

    How to calculate total cost based on number of nights with weekly discount Image 5 Screenshot 104

    If you need any further assistance, please let us know.