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.

Conditional Logic JavaScript conflict

  1. I've embeded the form in my template and put the gravity_form_enqueue_scripts function in the header. When I do that, the form works properly, using conditional logic, but the jQuery on the rest of my site doesn't work. When I take the function out, the conditional logic ceases to work, but the rest of the sites' scripts do.

    I've tried hardcoding the header and form code for conditional logic, thinking it was a duplicate of jquery.min.js causing the problem, but that doesn't work either.

    The URL I'm working at is http://mobilemissionshop.com/

    The form is in the bottom right-hand corner with a "+" on the top. It's styled like a Qualaroo form.

    Posted 11 years ago on Friday March 15, 2013 | Permalink
  2. Richard Vav
    Administrator

    You are including jQuery in the footer twice, version 1.9 from google and version 1.8.3 from local, please remove the following google call and see if that makes any difference, there have been a few problems reported with jQuery 1.9 and Gravity Forms

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
    Posted 11 years ago on Friday March 15, 2013 | Permalink
  3. I did that and even moved the other calls to external JS below the wp_footer to ensure they'd load after jquery, and now nothing works on the site as far as JS is concerned.

    I'm also getting these errors: 'undefined' is not a function (evaluating '$(window)')

    I'm guessing that's because jQuery is working in noconflict mode now? Any idea how to get around that one?

    Posted 11 years ago on Friday March 15, 2013 | Permalink
  4. Nevermind, I got it working! Thank you!

    Posted 11 years ago on Saturday March 16, 2013 | Permalink
  5. Richard Vav
    Administrator

    Glad to here you got it working

    Posted 11 years ago on Saturday March 16, 2013 | Permalink
  6. Mind letting us mere mortals know what you did to get this working?

    Posted 11 years ago on Sunday March 17, 2013 | Permalink
  7. Richard Vav
    Administrator

    I would guess moving jQuery to the header solved his issue, I have heard of people have problems when it is included in the footer because Gravity Forms generally includes it's scripts in the header and they depend on jQuery being loaded before them to function. That may not be the case with future versions though as I believe they are considering providing an option to enable loading the scripts in the footer.

    Posted 11 years ago on Sunday March 17, 2013 | Permalink