How can I add more than one coupon box

  • School_bonjour
    Asked on May 12, 2024 at 9:28 PM

    how can i add more than one coupon box? we allow users to combine coupon codes, is that possible with jotform?

  • Jeric JotForm Support
    Replied on May 12, 2024 at 9:44 PM

    Hi School_bonjour,

    Thanks for reaching out to Jotform Support. You can only have one coupon code in your payment form by default. The workaround is to create a coupon code field outside the payment field but this would also require you to create the product outside the payment field.

    For this, I’ll need a bit of time to work on a demo form. I’ll get back to you shortly.


  • Jeric JotForm Support
    Replied on May 13, 2024 at 8:29 AM

    Hi School_bonjour,

    Thanks for your patience. Here's the demo form I created. As I have mentioned above, the product needs to be created outside the payment field, use Short Text field for the discount code, calculate the discount through Update /Calculate field conditional logic, use the Form Calculation widget for the grand total, and pass the grand total value to the payment field. You can use ABC123 for the first discount code and ABC456 for the second discount code.

    I am still working on the steps, please give me more time for this.  I’ll get back to you as soon as I can.

  • Jeric JotForm Support
    Replied on May 14, 2024 at 3:07 AM

    Hi School_bonjour,

    Thanks for your patience. As promised, here's the steps;

    Create the product using the Multiple Choice field and assign a calculation:

    1. When you add form Element, select Multiple Choice.
    2. Click on the field and click on the Gear icon.
    3. On the right panel, click on the Options tab.
    4. Below that, Turn on the Calculation Values.
    5. Assign the Calculation values which is the price for the item.How can I add more than one coupon box Image 1 Screenshot 100

    Next, add the discount code fields using the Short Text element.

    How can I add more than one coupon box Image 2 Screenshot 111

    Below each discount code field, add a Number field which calculates the discount value for each discount code via conditional logic. Since we only need it on the backend for calculation, we can hide these fields.

    1. When you add a form element, select Numbers.
    2. Click on the field and click on the Gear Icon.
    3. On the right panel, click on Advanced.
    4. Turn on Hide Field.How can I add more than one coupon box Image 3 Screenshot 122

    Next, add the Form Calculation widget to calculate the total discount and the Grand total less the total discount.

    1. When you add a form element, click on Widgets.
    2. Search and select Form Calculation.
    3. Click on the field and click on the Gear icon.
    4. Create the formula. For this, we just need to add the Discount 1 and Discount 2 value. You can click on the Add Field button to add the field and use the virtual key for the operation sign.
    5. Finally, click Save.How can I add more than one coupon box Image 4 Screenshot 133For the Grand total, simply subtract the Multiple Choice field with the product from the Total discount field using the same steps above.How can I add more than one coupon box Image 5 Screenshot 144

    Next, create an Update/Calculate conditional logic to calculate the discount value.

    1. On the Form Builder, click on Settings.
    2. Select Conditions.
    3. Click on Update/Calculate Field.How can I add more than one coupon box Image 6 Screenshot 155
    4. Create the conditions. In this example, if code one is equal to ABC123, we will calculate the Discount 1 value. So the formula is Plan A field * .10 since I want 10% for the discount code.
    5. Finally, click on Save.How can I add more than one coupon box Image 7 Screenshot 166For the Discount code 2, this time my discount code is ABC456 and 5%How can I add more than one coupon box Image 8 Screenshot 177

    Lastly, add the payment field, set the payment type to User Defined Amount and get the price from Grand Total field.

    1. When you add a form element click on the Payment tab.
    2. Select your Payment Integration of choice and click on the wand icon.
    3. Once you connect your account, set the payment type to User Defined Amount.
    4. Finally, on Get Price From, select Grand Total.

    How can I add more than one coupon box Image 9 Screenshot 188

    Give it a try and let us know how it goes.

 
Your Answer