How do you enter a promo code and have it calculate?

  • FineLinesFurnishings
    Asked 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 Support
    Replied 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.

    1516298521t13 01 37 Screenshot 10

    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

    1516299295t13 13 34 Screenshot 21

    The field's value will change conditionally to 0.80 if the entered coupon is correct. (0.80 is 20% off)

    1516300591t13 33 50 Screenshot 32

    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.

    1516300874t13 40 11 Screenshot 43



    Just to add — since you are processing the calculation using a widget, you can already delete this condition from your form:

    1516301239t13 42 29 Screenshot 54 


    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

    1516301572t13 52 Screenshot 65

    I hope this helps. If you have other questions, please feel free to let us know.