How to create coupon code for calculation field

  • Profile Image
    Asked on January 29, 2015 at 02:48 AM


    With the normal payment wizard (eg Paypal), I can create a coupon and limit how many times it can be used. However, how can I achieve the same thing when I grab the payment value from the calculation field (custom amount payments)?

    Thank you!!


  • Profile Image
    Answered on January 29, 2015 at 09:38 AM

    It is possible to create a coupon code by adding text box field to accept the discount code and then adding a Form calculation field. 

    Now we need to setup a condition that if coupon is equal to "coupon1" then update the Form calculation field:

    In this case there is a fixed discount of 20 USD:

    You can test and clone the demo form (coupon is coupon1): 

    Let us know if we can assist you further.   

  • Profile Image
    Answered on January 29, 2015 at 09:39 AM

    You can see here how to clone a form: 

    Thank you

  • Profile Image
    Answered on January 31, 2015 at 07:38 AM


    Thank You for this workaround.  I really need some coupons for "Form Caluculation" field. Now i even manage how to make those coupons expire on specific date :) But one thing left. It would be great to make those coupons expire after 1 or X times used. Plug-in would be awesome or even workaround.

    Thank You





  • Profile Image
    Answered on January 31, 2015 at 05:08 PM

    Hi dziewano,

    To give your coupon a expiration date, you can use a date field with the update field condition.

    To do this, you would add a date field to your form. You will set the field to be the default date/time. You can then make the field hidden or read-only.

    You would then create the following conditions

    You would replace the date with your desired expiration date.

    You would then ensure that this condition has a higher priority than the first

    You can test my form here: 

    You are able to edit the date so as to see the condition at work.

    To have a limit on the amount of coupons that can be entered you would need to do a work-around including form limits.

    You would decide how what is your limit on the discount. You would then provide a code for the total. You would then add each code to the condition:

    You would then place a limit on the coupon code box. This would mean that each code could only be entered once

    The user would get the message when they attempt to submit the form. As such, you would edit the message as well

    You can view the sample form here: 

    I already submitted using coupon2, so any attempt to use that code will result in an error message when the form is submitted.

    I hope these are suitable work around for you. Please inform us if you need further assistance.

  • Profile Image
    Answered on January 31, 2015 at 08:20 PM

    About the date, can we set the timezone as well?

  • Profile Image
    Answered on January 31, 2015 at 09:24 PM

    Unfortunately, this is not possible since the DateTime field grabs the current date/time from the OS. In other words, it uses the information provided by the operating system where the form is being rendered to populate the field.

    If you want to use a specific time zone then you would need to use a server time service like this one: to grab the date/time for a specific zone. But in order to use it in your form, you'll need to use the full source code and a custom script that can populate the date/time field that is used to validate if the coupon code has expired or not with the method provided by my colleague.

    Hope this helps.

    Let us know if you have further questions.
    Thank you.

  • Profile Image
    Answered on February 05, 2015 at 07:03 AM

    Thank You Shadae. You helped mi alot, especially with Unique question. I missed that feature.

  • Profile Image
    Answered on February 05, 2015 at 09:45 AM

    On behalf of my colleague you are most welcome.

    If you need further assistance please let us know as we're here to help.