PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

None of my javascript is working

  1. Homebase
    Member

    I am having several issues. The biggest one is that none of the javascript is working for the plugin on one of my forms. When I preview the form everything works fine, but if I embed it into a page then it stops working. in the console i get the error
    'Uncaught TypeError: Object [object Object] has no method 'datepicker'
    and a bunch of other errors depending on what I click on. The javascript obviously isn't being loaded because of the errors, but I have no idea how to fix it.

    On another form the entire thing is hidden by default and I have to add the css 'visible:inherit !important' to get it to show up.

    In both forms I am using conditional logic. Is that what is causing the problems?

    I really need to get this error fixed so that I can finish the website.

    Posted 12 years ago on Thursday June 7, 2012 | Permalink
  2. David Peralty

    Can you link your form so we can take a look?

    Posted 12 years ago on Thursday June 7, 2012 | Permalink
  3. Homebase
    Member

    http://bcodev.com/insiders/requestforfunds/

    On the first option it is supposed to show a set of checkboxes depending on which option you choose.

    Posted 12 years ago on Thursday June 7, 2012 | Permalink
  4. David Peralty

    Your error is related to the fact that you have 2 JQuery calls, one is 1.6 in the header and the other is 1.7.2 in the footer. You should only have one and it should be in the header and it should be the 1.7.2 version.

    Posted 12 years ago on Thursday June 7, 2012 | Permalink
  5. The issue is with your theme. The form isn't showing when there is conditional logic because of JavaScript errors. At the top of your source you are including an old version of jQuery and in the footer after all of your scripts you are including a newer version.

    Your goal here would be to get rid of the jQuery reference in the footer, and make sure your jQuery reference in the head is the latest version.

    You can test for theme/plugin conflicts by following the instructions here:
    http://www.gravityhelp.com/documentation/page/Testing_for_a_Theme/Plugin_Conflict

    Posted 12 years ago on Thursday June 7, 2012 | Permalink
  6. Homebase
    Member

    It looks like it is gravity forms that is trying to load the older version of jQuery, I am right?

    Posted 12 years ago on Thursday June 7, 2012 | Permalink
  7. That is incorrect, we enqueue and load jQuery when necessary and use the version that ships with WordPress, as that is the correct way to do so. This screenshot shows it's coming from a google hosted resource.

    Does your form with conditional logic show and function in the the formbuilder preview?

    Posted 12 years ago on Thursday June 7, 2012 | Permalink
  8. Homebase
    Member

    I deleted the jQuery being loaded in the footer and now it seems to be working. Everything worked in the preview of the form. I guess wordpress is still loading an older version of jQuery

    Posted 12 years ago on Thursday June 7, 2012 | Permalink
  9. Gravity Forms does not output an older version of jQuery, as I said above. Here is a screenshot of my dev site running the default Twenty Eleven theme and Gravity Forms. You will see it indeed is loading the latest version that is included with WordPress.

    Posted 12 years ago on Thursday June 7, 2012 | Permalink
  10. Homebase
    Member

    Cool, thanks for your help. Now that everything is working I can finish the website build.

    Posted 12 years ago on Thursday June 7, 2012 | Permalink
  11. No problem, glad you got it working.

    Posted 12 years ago on Thursday June 7, 2012 | Permalink

This topic has been resolved and has been closed to new replies.