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.

Form.css not being loaded

  1. Running WordPress 3.2 Beta 2, and GF 1.5.2.3. I'm using a shortcode inside of <?php echo do_shortcode(); ?> so that I can place this inside of a yet another related posts template file.

    I have a contact page that is a form inserted through the Page editor in WP-admin, and the form.css file is loading on that page, but not the single-post page where I've got the YARPP template showing up.

    I've disabled all my plugins to see if it was a plugin conflict, but that doesn't seem to matter. I also tried to switch themes (Headway 2.0.11 to TwentyTen) and that didn't make a difference.

    Any idea what's going on? Thanks!

    Posted 13 years ago on Sunday June 12, 2011 | Permalink
  2. You don't need to use the "do_shortcode" method to embed your form, there is a built-in function call for embedding the form outside of the WordPress loop.

    http://www.gravityhelp.com/documentation/page/Embedding_A_Form

    When embedding a form via a function call you must also manually include the necessary Gravity Forms related Javascript and CSS via the built in WordPress enqueue capabilities. Gravity Forms does not include these by default when calling a form via the function call and they are necessary for forms that contain conditional logic or the date picker field.

    Gravity Forms 1.5 introduced the gravity_form_enqueue_scripts function which allows you to easily enqueue the necessary Gravity Forms' scripts and styles when manually embedding a form. This is also useful if you are using a GF widget and do not wish for the styles and scripts to be loaded inline.

    You will need to manually enqueue the scripts and CSS by placing a short script block in your theme's header.php file. More information is at the URL below.

    http://www.gravityhelp.com/documentation/page/Gravity_form_enqueue_scripts

    Posted 13 years ago on Sunday June 12, 2011 | Permalink
  3. I only tried using do_shortcode() because I wasn't getting the CSS file to load using gravity_form();.

    Here's the code I've got, http://www.pastie.org/2057375, but that still doesn't seem to load the form.css or the js files.

    Posted 13 years ago on Sunday June 12, 2011 | Permalink
  4. Try moving the enqueue script to you theme's header.php file.

    Posted 13 years ago on Monday June 13, 2011 | Permalink
  5. barbcarlson
    Member

    hmmm..... I am using cart66 and have hundreds of products with their own unique form. Can I separate the form id's via commas in one function call or do I need a separate function call for each form(ajax setting will be the same for each form)?

    Posted 13 years ago on Thursday August 4, 2011 | Permalink
  6. Barb, please start a new topic for your question specifically and explain your problem there.

    Posted 13 years ago on Thursday August 4, 2011 | Permalink