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 add code to Submit button?

    Asked by shikha4 on March 09, 2012 at 01:40 AM

    Hi,

    I have created a form with a Submit button at the end. When a customer clicks "Submit" button, I want it to send it to my payment gateway directly. The payment gateway has given this code for me to create a sumbit button which takes the customer to the payment page:

       <form action="https://www.ccavenue.com/shopzone/cc_details.jsp" method="post" >
                <input type="hidden" name="Order_Id" value="
    XXXXXXXXXXXX">
                <input type="hidden" name="Amount" value="
    XXXXXXXX">
                <input type="hidden"name="Merchant_Id" value="
    XXXXXXXXXXXXXXXXX">
                <input type="hidden" name="billing_cust_name" value=""> 
                <input type="hidden" name="billing_cust_address" value=""> 
                <input type="hidden" name="billing_cust_country" value=""> 
                <input type="hidden" name="billing_cust_tel" value=""> 
                <input type="hidden" name="billing_cust_email" value=""> 
                <input type="hidden" name="billing_zip_code" value=""> 
                <input type="hidden" name="billing_cust_state" value=""> 
                <input type="hidden" name="billing_cust_city" value=""> 
                <input type="hidden" name="billing_cust_notes" value=""> 
                <input type="hidden" name="delivery_cust_name" value=""> 
                <input type="hidden" name="delivery_cust_address" value=""> 
                <input type="hidden" name="delivery_cust_tel" value=""> 
                <input type="hidden" name="delivery_zip_code" value=""> 
                <input type="hidden" name="delivery_cust_state" value=""> 
                <input type="hidden" name="delivery_cust_city" value=""> 
                <input type="submit" value="Submit">
                </form>

    I want to use Jotform submit button. How can I insert this code into my form? Please let me know as soon as possible! Thanks!

  • Profile Image
    JotForm Support

    Answered by idarktech on March 09, 2012 at 03:59 AM

    Hi,

    If you're trying to submit the form at the same time redirecting to your payment gateway using that button, then sorry but it's not currently possible with JotForm. What I can suggest for you about this is to insert that button inside your Thank you message instead. To do that, simply follow this steps below:

    1. Click Setup & Embed

    2. Click Thank you 

    3. On the Thank you Page Wizard, select Thank you Message

    4. Open HTML Source editor by clicking on the HTML button on the tool bar.

    5. Paste that button Code.

    (Click the image to view its actual size)

    Demo: http://form.jotform.me/form/20680770752455

    Hope this still helps. If you have further questions, please let us know. Thank you so much!

  • Profile Image

    Answered by shikha4 on March 09, 2012 at 07:07 AM

    Thank you so much for your super quick response! I decided to forward users to a page, where we are using jquery to automatically click on the submit button generated by the code, which forwards the user to the payment gateway. This eliminates an extra click.