What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How to create coupon code for calculation field

    Asked by redmarauder88 on January 29, 2015 at 02:48 AM

    Hi,

    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!!

     

    Screenshot
    create same and amount
  • Profile Image

    Answered by Carina 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): 

    http://form.jotformpro.com/form/50283593132957? 

    Let us know if we can assist you further.   

  • Profile Image

    Answered by Carina on January 29, 2015 at 09:39 AM

    You can see here how to clone a form:

    http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Thank you

  • Profile Image

    Answered by dziewano on January 31, 2015 at 07:38 AM

    Hi

    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 by Shadae 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: http://www.jotform.com/form/50306221582950 

    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: http://www.jotform.com/form/50305896595971? 

    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 by redmarauder88 on January 31, 2015 at 08:20 PM

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

  • Profile Image

    Answered by raul 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: http://www.timeanddate.com/clocks/free.html 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 by dziewano 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 by Carina 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.