What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

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.


  • Profile Image

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

    Asked by JS2706 on September 19, 2016 at 01: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!



    This is a re-post of a comment on How to Insert Text or Mathematical Calculation into a Field Using Conditional Logic

    calculation form custom calculation web form
  • Profile Image
    JotForm Support

    Answered by Mike on September 19, 2016 at 04:06 PM

    This is possible with calculation features at JotForm.

    Here is an example:

    - Total number of nights added with a Number field.

    - Two Form Calculation fields to implement the calculation.

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

    - Total calculation formula.

    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.

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