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 Broken

  1. Hi there

    I'm using Gravity Forms version 1.6.4.5 with WordPress version 3.4.1

    I am trying to create a form with conditional logic but am getting a couple of problems.

    The form in question is here:
    http://southtees.mixd.co.uk/patients-visitors/rearrange-or-cancel-an-appointment-conditional/

    A couple of issues:

    - Oddly, when I apply any conditional logic to the form, it is adding style="display: none;" onto .gform_wrapper. I've had to use an !important line in the CSS to overwrite it

    - Conditional logic is applied to both the radio buttons and the checkbox. If you click on either I get Uncaught TypeError: Cannot read property '6' of undefined

    Can someone please take a look and help out? Much appreciated.

    Posted 11 years ago on Tuesday July 17, 2012 | Permalink
  2. The "display:none" is added to any form with conditional logic. Then jQuery is used to unhide the form. If the form cannot be unhidden, it's usually due to a JavaScript or jQuery error. You overrode that with CSS but you masked the problem, but did not fix it. You should remove that so we can find the source of the problem rather than address the symptom.

    I see this JavaScript error right now:

    [js]
    Timestamp: 7/17/2012 7:13:09 AM
    Error: window.gf_form_conditional_logic is undefined
    Source File: http://southtees.mixd.co.uk/wp-content/plugins/gravityforms/js/conditional_logic.js?ver=1.6.4.5
    Line: 21

    The first step in finding and fixing this problem is to test for plugin and theme conflicts. Start here http://rkt.gs/testing

    Thank you

    Posted 11 years ago on Tuesday July 17, 2012 | Permalink
  3. Hmm yeah. It's because jQuery is included in the <head> and also at the bottom of the page. Is there any way I can deregister jQuery to stop Gravity Forms adding it in the <head>, with functions.php?

    Posted 11 years ago on Tuesday July 17, 2012 | Permalink
  4. It needs to be in the <head> for Gravity Forms to work. It needs to be present in the beginning of the page for the page to render properly. Can you remove your call to jQuery in the footer?

    Posted 11 years ago on Tuesday July 17, 2012 | Permalink
  5. Sizeable
    Member

    I'm having a similar issue. No Javascript errors (confirmed via Inspector)... but the difference is I'm calling the form directly via function gravity_form( $id, false, false, false, false, true );

    Could this be why? Can provide URL and HTTP auth (client dev site) to show – nothing is executing to turn off the display:none;

    Posted 11 years ago on Saturday August 18, 2012 | Permalink
  6. We will need to see the form online to be able to help you with this. Please post a link to the site with the required auth. If you can't post it here, please email to chris@rocketgenius.com and I will take a look at it for you. It may not be a JavaScript error which will show up in Inspector, but it can be the wrong jQuery version or multiple jQuery version being loaded. We'll have to see it to know for sure.

    Posted 11 years ago on Sunday August 19, 2012 | Permalink
  7. Andy, I replied to your email. Please post your findings here. Thanks.

    Posted 11 years ago on Monday August 20, 2012 | Permalink