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.

Styles not including and form not working with php function embeded

  1. Hi, I tried to embeded a form using gravity_form function, and then add the styles with gravity_form_enqueue_scripts, but the form do not display de CSS correctly (check http://darangilau.royalworkshop.com/reservaciones/, progress bar) and the ajax form steps only works on Chrome.

    I'm using the WP 3.1.2 and GF 1.5.2

    Posted 12 years ago on Tuesday May 17, 2011 | Permalink
  2. Where have you placed the gravity_form_enqueue_scripts function call? Because the scripts and CSS aren't being enqueued, which means the function call is unable to enqueue them.

    This happens when the function call is placed somewhere in your theme where it's executed too late in the WordPress execution process to be able to enqueue the necessary scripts.

    The safest place to put the gravity_form_enqueue_scripts function call is in your themes functions.php file. If you need to limit it so it only happens on a specific page you can wrap the function call in an if statement checking for the correct page.

    Posted 12 years ago on Tuesday May 17, 2011 | Permalink
  3. gravity_form_enqueue_scripts is not working, i added it inside my page template at embeds a form

    what i did is manually link the css file from gravity form, what is the javascript code being called to submit the form with ajax capability?

    http://jvai.com/dev/before-and-after-gallery/aesthetic-gallery/obagi-skin-care/

    Posted 12 years ago on Wednesday May 25, 2011 | Permalink
  4. i also tried this code on my functions.php

    <?php echo do_shortcode('[gravityform id=3 name=GalleryAppointment Request title=false ajax=true]'); ?>

    this one does not load the needed javascript and css files

    Posted 12 years ago on Wednesday May 25, 2011 | Permalink
  5. You don't add gravity_form_enqueue_scripts in your page template, you would put it in your themes functions.php file.

    You also wouldn't place the shortcode in your functions.php the way you have. That isn't going to work, you can't output a shortcode in your functions.php because it's only for behind the scenes code execution and the shortcode can't echo information in that file.

    The gravity_form_enqueue_scripts function call needs to go in your themes functions.php file.

    You then need to enclose it in an if statement so it's only output on whatever page you need to use it on.

    Posted 12 years ago on Wednesday May 25, 2011 | Permalink
  6. i added gravity_form_enqueue_scripts on my theme functions, put it inside a custom function and call it inside my template page, still the css is not displaying..

    Posted 12 years ago on Wednesday May 25, 2011 | Permalink
  7. Is CSS output turned ON on your Settings page of Gravity Forms? (Forms > Settings)

    Does your theme have the wp_head() function call in the header.php file? If not, scripts and CSS can't be enqueued in the head.

    Posted 12 years ago on Wednesday May 25, 2011 | Permalink
  8. yes it is turned on.. of course it has...

    Posted 12 years ago on Thursday May 26, 2011 | Permalink
  9. @webpuzzlemaster It's not uncommon to find themes without the proper WordPress wp_head() and wp_footer() functions included. We see both scenarios all the time so verifying both is just a normal part of the debugging process.

    Posted 12 years ago on Thursday May 26, 2011 | Permalink
  10. There is no way to fully know what is going on without looking at your code and how you have things setup. If you want us to look at it you'll need to send us a WordPress admin login and FTP login via our Contact Us form and describe how you have things setup so we know what to look at.

    Posted 12 years ago on Thursday May 26, 2011 | Permalink
  11. where is the contact form? or can i just use http://www.gravityhelp.com/priority-support/

    Posted 12 years ago on Thursday May 26, 2011 | Permalink
  12. Contact Us form is here: http://www.gravityforms.com/contact-us/

    Posted 12 years ago on Thursday May 26, 2011 | Permalink
  13. thanks i just fill up the contact form

    Posted 12 years ago on Thursday May 26, 2011 | Permalink
  14. is it possible to have a call to gravity_form in a template file (i.e. loop-event.php) and have the theme use gravity_form_enqueue_scripts from the functions.php with out an ID?

    I want to choose where my form goes on my page and so I pass a Custom Field with the ID of the form and then run it through gravity_form function call. The only issue is you have to enqueue the scripts for it (I am using conditional statements in the form) for it to work. But the ID that I need comes after the call to gravity_form_enqueue_scripts if it is in the functions.php file. I also tried putting it before the call to gravity_form.

    Thanks!

    Posted 12 years ago on Wednesday June 8, 2011 | Permalink