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

    Console error on success pop-up.

    Asked by johnsonvillemedicalcentre on August 19, 2016 at 01:13 AM

    I'm trying to create a pop-up success message as described in https://www.jotform.com/answers/809359-I-want-a-pop-up-thank-you-page-instead-of-redirect

    I've followed the instructions as given, however the page is still redirecting on success.

    In the console I get a $$ is not defined for the line:

    var myform = $$('form')[0];

    within the submission script advised.

    I thought it was to do with jquery not loading but everything else is working ok and that's running before the form script.

    Where should I be looking next to try and fix this?

     

    Page URL:
    https://codeshare.io/cz3Sv

    form script JotForm message next
  • Profile Image
    JotForm Support

    Answered by Chriistian on August 19, 2016 at 04:36 AM

    I checked the code that you shared and they all seem to be setup correctly. Perhaps there is conflict within jotform and your other libraries which is causing the error on your console. Can you please try adding the script <script>jQuery.noConflict();</script> on top of of the "var myform = $$('form')[0]" script.

    It should look like the example script below:

    <script>jQuery.noConflict();</script>

    <script type="text/javascript">

    $(document).ready(function(){

      var myform = $$('form')[0];

      myform.onsubmit = function() {

    ......................................

    </script>

    If the issue persists, please let us know. If the page is live, you can also share with us the url so we may check it there. Thank you.