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

  • Profile Image
    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?

  • Profile Image
    Mike_G
    Answered on January 18, 2018 at 01: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.png

    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.png

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

    1516300591t13_33_50.png

    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.png



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

    1516301239t13_42_29.png 


    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.gif

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