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

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

    Asked by bitsworkshop 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

    Page URL:
    https://bitsworkshop.org/register/procredit.html

    purchase OR JotForm pre-populated
  • Profile Image
    JotForm Support

    Answered by Welvin on December 20, 2014 at 01: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?couponinput=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!

  • Profile Image

    Answered by bitsworkshop 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

  • Profile Image
    JotForm Support

    Answered by jonathan on December 21, 2014 at 04:11 AM

    Hi Ira,

    Did you meant like this (see screenshot below)

     

    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.

     

  • Profile Image

    Answered by bitsworkshop 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

  • Profile Image
    JotForm Support

    Answered by Welvin on December 22, 2014 at 02:53 AM

    Hi Ira,

    Will try to implement that and let you know here.

    Thank you!