How do I add a discount code box

  • Profile Image
    stleoschool
    Asked on September 27, 2019 at 11:59 AM

    Hello,

    I have my order form all working, but I need to add a box to allow our teachers to input a discount code.  How do I do that?

    Thank you!

  • Profile Image
    zuritapia
    Answered on September 27, 2019 at 12:50 PM

    Hi @stleoschool!

    Here's my form https://form.jotform.com/92695276691978. You can clone this form back if you want. Guide: http://www.jotform.com/help/28-Cloning-a-Form-from-a-Web-Page 

    In the promo field, you can use OFFER5 code to get 5% discount.

    - I added a "promo value" text box below the "Have a promo code?" question

    - I then created the following condition.

    If promo code is equal to OFFER5, insert TotalPriceField * 0.05 (5% discount) into the promo value field

    20170208085655.png

    - Then in the total calculation wizard, I subtracted them with the promo value

    20170208085733.png

    I hope this helps, please let us know if you have further questions or concerns.

  • Profile Image
    zuritapia
    Answered on September 27, 2019 at 12:51 PM

    My apologies the correct URL to my form is https://form.jotform.com/92695276691978.

  • Profile Image
    stleoschool
    Answered on September 27, 2019 at 03:29 PM
    Hello,
    I got the discount code to work. I have added a second box for folks to be
    able to insert an amount that needs to be deducted if they are not going to
    be there for a particular day(s). I have added the condition and to
    subtract it in the Grand Total box. But, it is not working. Can you take
    a look? Most likely, folks would input a number like $4 or 5.75. Anytime
    I do that, I get a negative number in the Grand Total box.
    Thanks!!
    Here is the URL again: https://form.jotform.com/92545883919171
    ...
  • Profile Image
    Kevin_G
    Answered on September 27, 2019 at 04:43 PM

    The calculations do not work since the conditions is inserting the result in the same field that's involved in the calculation. 

    15696168232019-09-27_14h25_46.png

    As I can see, you only need to subtract the value in the "Field Trip Deduction" field, if that's the case then you do not need the condition and instead simply add this field to the current calculation in your "Grand Total" widget. 

    Kindly try deleting/disabling the condition and including the deduction field in the calculation only to see how it works. Also, note that it will return a negative value as long as the total is less than the deduction amount.