-
FineLinesFurnishingsAsked on January 18, 2018 at 12:13 PM
I'm trying to add a promo code for 20% for new clients with a particular code word - how can I add this to the calculated field for my services?
-
Mike_G JotForm SupportReplied on January 18, 2018 at 1:59 PM
Upon checking your account, I see that you have a form integrated with Stripe in which the total amount is derived from a Form Calculation widget as explained in this guide — How-to-pass-a-calculation-to-a-payment-field
If you want to have a way for your respondents to enter a promo or a coupon code to get a 20% discount, you need to add a separate Coupon Code field first.
After that, add another field that will have the discounted percentage (conditionally) if the coupon entered in the Coupon Code field is correct. Set the field to hidden and set that field's default value to 1.0
The field's value will change conditionally to 0.80 if the entered coupon is correct. (0.80 is 20% off)
And lastly, include that field in the equation of the Form Calculation widget where the amount that will appear in Stripe payment field is obtained.
Note: In the equation, the dollar sign ($) should be a string to avoid conflicts.
Just to add — since you are processing the calculation using a widget, you can already delete this condition from your form:
The screenshot below shows the result after I have applied the steps above to a clone version of your form — https://form.jotform.com/80175525896972
I hope this helps. If you have other questions, please feel free to let us know.