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.

gravity_form_enqueue_scripts() doesn't seem to work

  1. Hello,

    I'm embedding a from using a function call as per instructions here http://www.gravityhelp.com/documentation/page/Embedding_A_Form

    I've added code to enqueue the scripts and css in the header.php as per instructions here http://www.gravityhelp.com/documentation/page/Gravity_form_enqueue_scripts

    However, when I inspect the code source of a page, no java scripts or css files are added. Am I doing something wrong here? I'm a bit confused.

    Many thanks for your help.

    Posted 13 years ago on Monday September 19, 2011 | Permalink
  2. The best place to put the enqueue is in your functions.php file. Wrap it in an if statement if you need to only enqueue it on a specific page or post id. That is the first change I would make. It sounds like the enqueue isn't working.

    It's hard to tell without seeing a link to the page to see the output, or seeing what code you have implemented.

    Posted 13 years ago on Monday September 19, 2011 | Permalink
  3. @Carl, thanks for the reply.

    I don't think there should be any difference if the code is placed in the functions.php or header.php

    I do apologise, the following scripts are present on the page:

    <script type='text/javascript' src='http://grovelands.dev/wp/wp-content/plugins/gravityforms/js/jquery.json-1.3.js?ver=1.5.2.8'></script>
    <script type='text/javascript' src='http://grovelands.dev/wp/wp-content/plugins/gravityforms/js/gravityforms.js?ver=1.5.2.8'></script>
    <script type='text/javascript' src='http://grovelands.dev/wp/wp-content/plugins/gravityforms/js/jquery.textareaCounter.plugin.js?ver=1.5.2.8'></script>

    However, no css.
    Are these correct?

    Many thanks

    Posted 13 years ago on Tuesday September 20, 2011 | Permalink
  4. That is the JS but if the CSS isn't being output then either you have CSS output turned OFF on the Settings page (check that first) or something is preventing the CSS from being enqueued. It's possible it could be a plugin or theme conflict.

    Posted 13 years ago on Tuesday September 20, 2011 | Permalink