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

    JQuery .submit() is not working with the form.

    Asked by karlotito on March 21, 2017 at 10:56 PM

    I do wanted to push a datalayer event when my form is been submitted. Using the jquery function .submit form it does not trigger the event. Here is my code.

    $(document).ready(function(){ $("#70542578588369").submit(function(){ dataLayer.push({’event’: ‘order-sim-submit’}); console.log('dataLayer has been push'); });


    Please do help me. I need to track the submission of the form.

    Page URL:

  • Profile Image
    JotForm Support

    Answered by Charlie on March 22, 2017 at 05:22 AM

    I'm sorry, I'm not sure if I understood your concern correctly, or what you would like to accomplish.

    Do you want to trigger another function once the form is submitted? 

    Note that the form is embedded via script and is using prototype for Javascript, so calling jQuery might conflict with it. 

    Perhaps using the form's full source code and adding the listener there directly would work? You can get the full source code here: https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form

    If your loading jQuery then I suggest using .noConflict() to avoid conflicting with JotForm's prototype library: https://api.jquery.com/jquery.noconflict/

    I hope that helps. 

  • Profile Image

    Answered by karlotito on March 22, 2017 at 09:25 PM

    Thanks for the reply,

    Using the full source code instead the embedded source helps me to trigger the function when the form has been submitted.

  • Profile Image
    JotForm Support

    Answered by Charlie on March 22, 2017 at 10:52 PM

    I'm glad to hear that. Should you need any assistance again, feel free to open a new thread here in the forum. 

    Thank you.