# How to calculate the discount total depending on the amount of options selected from the Multiple Choice field.

• K9Trio
Asked on June 01, 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.

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

• jonathan
Answered on June 01, 2017 at 01: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

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
Answered on June 01, 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

• BDAVID
Answered on June 01, 2017 at 01: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
Answered on June 01, 2017 at 02:18 PM

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

that would be great if you could help

• BDAVID
Answered on June 01, 2017 at 05:14 PM

I have created the following workaround for you:

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:

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

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

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

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

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

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