Pass Stripe and/or Purchase Order Coupon via URL in custom embedded form

  • bitsworkshop
    Asked on December 20, 2014 at 11:18 AM

    Hi -

    Revisiting passing the Coupon field being pre-populated via the URL (http://www.jotform.com/answers/475628-Prepopulate-Coupon-Code-through-URL-parameter#3)... Thank you for submitting the feature update.

    However, since I need to host the form code on my site due to autofill issues (in this private thread) would it be possible for someone to tell me how to modify it to accept the coupons via the URL? I am assuming there is some type of parameter change that needs to be made to the java script.

    This will provide me with the desired functionality until this update is ready to be implemented in your production code.

    Thank you,

    Ira

  • Welvin Support Team Lead
    Replied on December 20, 2014 at 1:43 PM

    Hi Ira,

    Try to use the modified source codes here: http://pastiebin.com/5495c2d3c360e

    Then you can call the coupon like this: https://bitsworkshop.org/register/procredit.html?couponDISABLEDinput=coupon1

    "couponinput" is the added name of the coupon codes box. "coupon1" is your actual coupon codes. You need to click "apply" button. I'm trying to do this automatically, but please try this method first if that suits your needs.

    Thank you!

  • bitsworkshop
    Replied on December 20, 2014 at 11:21 PM

    Hi Welvin,

    Yes, this is the right concept. If you can figure out how to trigger the "apply" button it would do exactly what is needed.

    We could then generate a URL in our emails (using MailChimp) that would provide almost a one click registration system. We could generate the URL with everything other than payment info completed.

     

    I look forward to what you figure out on how to trigger the "apply".

    Thanks,

    Ira

  • jonathan
    Replied on December 21, 2014 at 4:11 AM

    Hi Ira,

    Did you meant like this (see screenshot below)

    Pass Stripe and/or Purchase Order Coupon via URL in custom embedded form Image 1 Screenshot 20

     

    Please clarify so we can check for the appropriate solution.

    In case it was what you meant, you can trigger the auto "click" action on the button by using javascript code on the form's source code similar to what was described here 

    Thanks.

     

  • bitsworkshop
    Replied on December 22, 2014 at 12:41 AM

    Hi Jonathan -

    Yes, the action of behind the "Apply" button is required IF couponinput is not empty. Is it possible to do a conditional (PHP? Java?) that then calls the right JavaScript?


    Thanks,

     

    Ira

  • Welvin Support Team Lead
    Replied on December 22, 2014 at 2:53 AM

    Hi Ira,

    Will try to implement that and let you know here.

    Thank you!