The issue is how you have implemented it. I'm not familiar with the Anything slider. But you have to be careful when using Gravity Forms outside of a standard WordPress page or post using the shortcode.
If the shortcode isn't called from a standard loop in a standard page or post then it isn't going to be able to enqueue it's scripts or CSS. Because you have implemented it using the Anything slider, that is going to be the case with your implementation.
What you need to do is first you need to make sure you manually enqueue the necessary scripts and CSS for Gravity Forms on your homepage. You would do this by using the gravity_form_enqueue_scripts function. This function is documented here:
http://www.gravityhelp.com/documentation/page/Gravity_form_enqueue_scripts
You would use this function in your themes functions.php file. If you only need this for the homepage then you should wrap the function call in an if statement that checks if it's the homepage or not. For example:
if ( is_home() ) {
// This is a homepage place the function within this if statement
}
The other thing you are going to want to do is because the form appears in a slider, you want to enable the AJAX option on the form shortcode or function call. This way when the form is submitted it does not refresh the page which could cause problems with the slider when the page refreshes.
Posted 12 years ago on Thursday December 22, 2011 |
Permalink