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.

Forms showing on some pages but not others

  1. Hi,

    My form at https://www.saffronforintermediaries.co.uk/request-an-agreement-in-principle/ is not showing (not loading the mark-up), however, a similar form at https://www.saffronforintermediaries.co.uk/request-a-key-facts-illustration/ is showing.

    It was working on the test server but not on the live server. What do I need to do to get the form to display?

    Matt

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  2. Richard Vav
    Administrator

    How are you embedding the form on the page, also you have a number of javascript errors because jQuery is being loaded multiple times. The first call is pulling jQuery 1.9.1 from jQuery.com

    <script src="https://code.jquery.com/jquery-latest.js"></script>

    The second call is loading version 1.7.2 from the Google CDN

    <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver=1.7.2'></script>

    jQuery should only be included once on a page and the recommended version for WordPress 3.5.1 is jQuery 1.8.3 which is the version it comes bundled with. WordPress 3.6 when released in later this month or early next will come with at least jQuery 1.9.1

    Regards,
    Richard

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  3. Thanks Richard. I'm not sure your suggestion will work, because I can load another form on the same URL.

    This information may help: I duplicated this form and deleted a load of fields, and after a while the form rendered. It's a long form (30+ fields).

    Matt

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  4. David Peralty

    So you think it is the form or the page it is embedded on? Does the form work in preview?

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  5. I think it's the form, however, it works in preview.

    I can send you the XML export if you think that would be useful?

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  6. David Peralty

    If the form works in preview, then the issue is your theme, not the form and Richard's notice with the JQuery versions becomes important as the forms that work likely don't have any Conditional logic or JavaScript requirements while the forms that don't are probably not showing due to JQuery issues caused by multiple versions.

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  7. I've fixed the multiple versions of JQuery. The latest version is being loaded.

    Both forms at:

    https://www.saffronforintermediaries.co.uk/request-an-agreement-in-principle/

    https://www.saffronforintermediaries.co.uk/request-a-key-facts-illustration/

    Have conditional logic.

    I'm not sure what to try now?

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  8. David Peralty

    You have not yet fixed the multiple JQuery versions -

    Near the top of the page you have:
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>

    Then further down you have:
    <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver=1.7.2'></script>

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  9. I think I've removed all versions now. Please check again.

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  10. Also - both form previews are no longer working.

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  11. I've restored my site to where it was at the beginning of the thread. The JQuery versions didn't seem to make a difference.

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  12. David Peralty

    Can you please go through these steps? http://www.gravityhelp.com/documentation/page/Testing_for_a_Theme/Plugin_Conflict

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  13. yes, you're right. It was a google analytics plug-in - of all things.

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  14. Richard Vav
    Administrator

    Good to hear you found the culprit, however you should still remove one of the jQuery calls as having it included twice is what is causing these two javascript errors

    Uncaught ReferenceError: jQuery is not defined jquery.validate.min.js:2
    Uncaught ReferenceError: jQuery is not defined additional-methods.js:14

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  15. Thanks Richard, I see them too.

    What do I need to do to get rid of them?

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  16. Richard Vav
    Administrator

    If those errors remain after one of the jQuery includes has been removed then those scripts mentioned in the errors aren't been included in the correct way. Can you copy and paste your themes header.php and functions.php files seperately to http://www.pastie.org/ and paste the links here so I can take a look.

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  17. functions.php: http://pastie.org/7944542
    header.php: http://pastie.org/7944550

    I suspect that the header is cached - and I can't seem to clear it.

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  18. Richard Vav
    Administrator

    OK so on line 63 and 64 of header.php you currently have this

    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.validate.min.js"></script>
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/additional-methods.js"></script>

    Scripts shouldn't really be hard coded like this they should be enqueued to ensure they are loaded correctly, in this case after jQuery, like so

    <?php
    wp_enqueue_script('jquery-validate',get_template_directory_uri() . '/js/jquery.validate.min.js',array('jquery'));
    wp_enqueue_script('additional-methods',get_template_directory_uri() . '/js/additional-methods.js',array('jquery'));
     ?>
    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  19. Superb! You are a gent!

    (that's English slang for 'gentleman' e.g. "you are THE MAN" if I was in North America).

    Many thanks, Richard.

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  20. Richard Vav
    Administrator

    You're welcome, and I'm actually up in Lancashire.

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  21. I assumed that the EDT time would mean US. Fair enough!

    While you're here - I've got another Gravity Forms plug-in issue: I can't save any data. I'm unchecking the required field and updating the form - yet the field remains checked when I refresh - any ideas? or should I start a new thread?

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  22. David Peralty

    Before starting a new thread, can you go to Form -> Settings and check to see if No Conflict is turned on, if it isn't, please turn it on and see if that helps.

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  23. I followed your instructions, but - any change made in the panel is not saved when I press "Save Settings".

    New thread?

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  24. David Peralty

    No, let's keep going here. Can I have you test against the previous instructions and see if you can isolate the issue? http://www.gravityhelp.com/documentation/page/Testing_for_a_Theme/Plugin_Conflict

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink