Cognito-forms – Multiple repeating section calculation

cognito-forms

I want to be able to give a discount on the total order amount instead of calculating for each specific section.

How do I add all the repeating sections together?

Best Answer

To create a coupon code, follow the instructions in this FAQ:
https://www.cognitoforms.com/support/54/collecting-payment/creating-coupons-and-discounts

For your calculation, you just need to add the item totals from all your repeating sections together:

=if CouponCode ="SAVE 10" then -(FirstRepeatingSection.Sum(ItemTotal)+SecondRepeatingSection.Sum(ItemTotal)+ThirdRepeatingSection.Sum(ItemTotal))*0.10 else 0