How add coupon code on the payment form?

  • MaisonClobert
    Asked on September 5, 2024 at 10:37 PM
    On the other hand, I can't find a way to add a coupon code for the Couch seating purchased via Square. I'll open another thread.
  • Jeric JotForm Support
    Replied on September 5, 2024 at 10:52 PM

    Hi Claudia,

    The option to add a coupon code is only available to Sell Products as a Payment Type. I see you selected User Defined Amount. We have a workaround to create a condition for the coupon code and include it in the calculation of the total amount. How are you going to provide the discount, it through percentage or fixed amount?

    Once we hear back from you, we'll be able to help you with this.

  • MaisonClobert
    Replied on September 6, 2024 at 12:46 AM

    The discount is $10 off the Couch seating of $55.


  • Jeric JotForm Support
    Replied on September 6, 2024 at 12:57 AM

    Hi Claudia,

    I understand your requirements, but I’ll need a bit of time to work out a solution. I’ll get back to you shortly.

    Thanks for your patience, we appreciate it.


  • Jeric JotForm Support
    Replied on September 6, 2024 at 7:08 PM

    Hi Claudia,

    Here's my solution. We will add a Short Text field for the Coupon Code and a hidden Number Field which will auto-populate the discount amount via condition if they put the right Coupon Code. On your Total with credit card calculation field, we will include the hidden Number field in the calculation. Let me show you how:

    Add a Short Text field, label it as Coupon Code, and add a Number Filed label it as Discount amount and hide it as shown below:

    How add coupon code on the payment form? Image 1 Screenshot 50
    Next, create an Update/Calculate field conditional logic. This will autopopulate the discount amount in the hidden Number Field when they enter the correct coupon code:

    1. In Form Builder, in the orange navigation bar at the top of the screen, click on Settings.
    2. Click on Condition on the left side of the screen.
    3. Select Update/Calculate Field.How add coupon code on the payment form? Image 2 Screenshot 61
    4. Create the Condition. In this example, If Coupon Code is equal 20 SALE10 ( You can assign your own code), will put 10 on the hidden Number Field (Discount Amount).
    5. Finally, click on the green Save Button below.

    How add coupon code on the payment form? Image 3 Screenshot 72

    Finally, we will include the hidden Number Field (Discount Amount) in the calculation of the Total with credit card. The calculation as shown below:

    How add coupon code on the payment form? Image 4 Screenshot 83Give it a try and let us know if you need any help.

  • Claudia Hommel
    Replied on September 6, 2024 at 7:17 PM

    Hi Jeric,

    This looks like a more elegant solution. You may not have seen an earlier response that expressed our "surrender". We're not going to use the code this time around because we've run out of time to apply it correctly. Thank you ALL for the follow-ups. These will be useful in the future for sure.


Your Answer