Calculate the total discount selected options in Multiple Choice?

  • K9Trio
    Asked on June 1, 2017 at 12:56 AM

    Hi, I have a multiple choice field, I would like to put a total depending on what they chose. If they chose just one it's $125,  if they choose 2 it's 10% off, 3 15% off, 4 20% off.  I'm not sure what the conditional logic would be? Or do I have to have each of these in their separate field? Any help appreciated, formulas aren't my best thing.

  • jonathan
    Replied on June 1, 2017 at 1:32 AM

    You just need to assign calculation values first to the choices/options in the multiple choice field.

    Check this user guide: How-to-Assign-Calculation-Value

    Calculate the total discount selected options in Multiple Choice? Image 1 Screenshot 20

    Then use the Calculation widget to do the calculations. It will be simpler now since each of the choices/options have actual numeric value in Multiple Choice field.

    Let us know if you need further assistance.

     

  • K9Trio
    Replied on June 1, 2017 at 12:00 PM

    I've got that but don't know how to do the percentage discounts? i

    f they select more than one they get a discount depending on how many they have chosen. 

    If they choose 2 it's 10% off, 3 15% off, 4 20% off. It's not dependant on what choices. They can chose options 2, 4, 5 and they are to receive a 15% discount

    Or they can choose options 3 & 4 and get a 5% discount

    Or they can choose option 1, 2, 3, & 4 and get a 20% discount

  • David JotForm Support Manager
    Replied on June 1, 2017 at 1:55 PM

    You can use conditional logic to calculate the percentage discount, what is the form you are working on? We will be glad to help you set it up.

  • K9Trio
    Replied on June 1, 2017 at 2:18 PM

    Hi, this is the form https://form.jotform.ca/62315122507243

     

    that would be great if you could help

  • David JotForm Support Manager
    Replied on June 1, 2017 at 5:14 PM

    I have created the following workaround for you:

    1) Add 6 form calculations widgets(one for each of your products):

    Calculate the total discount selected options in Multiple Choice? Image 1 Screenshot 110

    2) Use conditions to output the value of "1" to each of them, if the corresponding product was selected.

    For example, if product one is selected, then the value "1" would be set in the widget called "Product 1".

    These are all the conditions:

    Calculate the total discount selected options in Multiple Choice? Image 2 Screenshot 121

    3) Add another Form Calculation widget, which I labeled as "Total Products selected", to sum all the previous fields(Product1Product2Product3Product4 + Product5 + Product6) .

    Calculate the total discount selected options in Multiple Choice? Image 3 Screenshot 132

    4) Add another Form Calculation widget which I labeled as "Discount total".

    Calculate the total discount selected options in Multiple Choice? Image 4 Screenshot 143

    5) Rename the Total Owing as "Subtotal Owing":

    Calculate the total discount selected options in Multiple Choice? Image 5 Screenshot 154

    6) Add another calculation widget(name it Total Owing) to calculate the total(subtotal - discount amount):

    Calculate the total discount selected options in Multiple Choice? Image 6 Screenshot 165

    7) Now, create the following conditions to calculation the discount amount:

    Calculate the total discount selected options in Multiple Choice? Image 7 Screenshot 176

    Calculate the total discount selected options in Multiple Choice? Image 8 Screenshot 187

    8) Finally, hide the fields you don't want to show to the user:

    Calculate the total discount selected options in Multiple Choice? Image 9 Screenshot 198

    Please test my clone version of your form: https://form.jotformpro.com/71516840780963 

    Calculate the total discount selected options in Multiple Choice? Image 10 Screenshot 209

    You can clone it and use it if you want to: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Let us know if you have more questions.

  • K9Trio
    Replied on June 1, 2017 at 6:25 PM

    This is exactly what I needed thank you so much