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 and jotform conflict

    Asked by SixPlus on March 07, 2016 at 12:23 PM

    Our app is a single-page application (using javascript on both back and frontend), and I'm having trouble getting jquery and jotform to work on the same page. I cannot use an iframe because we have our own custom analytics we need to run, and iframes are also a PAIN to work with. I'm using the source code for the form, and it is causing issues, saying "JotForm is not defined".

     

    I have tried using $.noConflict() for this one page, and it still seems to be causing issues (saying JotForm is not defined). Has anyone come up with a comprehensive solution for this problem? Please do not ask me to globally run $.noConflict(). Our codebase is huge and that is simply not a feasible solution. I've uploaded the console error so you can take a look at the specific line of jquery that is causing this issue.

    Screenshot
    JotForm and problem source jQuery
  • Profile Image
    JotForm Support

    Answered by Charlie on March 07, 2016 at 03:38 PM

    This will indeed happen if you load form's full source code and other JS libraries on the same page. Unfortunately, the solutions you mentioned like using iFrame embed code and using $.noConflict globally in your other library are the only ones that we have. It is also mentioned in the jQuery $.noConflict documentation that this is the current solution that they have to avoid conflict from other JS libraries with jQuery: https://api.jquery.com/jquery.noconflict/