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

    Complicated discounts--need help with calculation logic

    Asked by SunbridgeInstitute on January 08, 2016 at 01:44 PM

    Thank you for all your wonderful help throughout the creation of my complicated form.

    Now I am trying to set up some complex discount logic, and it's not always working the way I thought it would.

    If you look at all the calculation logic that I have applied to the field "Total Tuition", you will see that I have 9 double "combo-discounts" that I am trying to automatically build in to the form.

    I also have a separate "coupon code" discount (that I have manually set up based on support advice). I am wanting this discount to override any of the previous "combo-discounts" that have been applied.

    Often this set up is working fine, but there are a couple times when it's not. I will give you one example here:

    When a person selects a 5-day course (such as "Approaching Grade 1") AND a Waldorf Weekend AND a Eurythmy workshop, they only get one discount of $5 but they should really get two discounts--a $5 discount and a $110 discount, for a total of $115. 

    Overall, I've figured that there are 26 different "combo" possibilities--I'm wondering if I have to write a logic calculation for each one of those, as opposed to the generic 9 double-combos that I have already put in the form.

    Ultimately, I have to rework these calculations so that all of the different combinations of "combo-discounts" will add together rather than re-writing each other.

    Thank you so much for whatever help you can give.

    P.S. please disregard the screenshot upload; I can't seem to delete it.

    Page URL:
    http://www.jotform.com//?formID=60007126527952

    Screenshot
    style calculations different all
  • Profile Image

    Answered by Sammy on January 08, 2016 at 11:38 PM

    The ideal approach is to have two fields that will take the discount prices one for the $5 and the other $110 which will then be combined after that you calculate the total and subtract the discount price then add the resulting value to the final cost for the tuition.

     

    Based on the combo conditions you might have several fields for holding the discount values, I have done an example using the above scenario, let me know how it is.

    I have disabled the other conditions for illustration purposes.

     

    https://form.jotform.com/60078854630963