The forms you're adding in the sidebar aren't loading the default Gravity Forms styles. When you add a form in the post body, the plugin detects this and enqueues the styles so that's why you see a difference on those pages vs. the ones with just the sidebar 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 a function call and they are necessary for forms that contain conditional logic or the date picker field.
We strongly recommend you enqueue the scripts rather than including them as hard-coded calls in your theme. Implementing it this way will insure that Gravity Forms does not include them on the page if they are already present. It is also a good practice to only load these scripts on the front end.
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.
You can find more information at the URLs below
http://www.gravityhelp.com/documentation/page/Embedding_A_Form
http://www.gravityhelp.com/documentation/page/Gravity_form_enqueue_scripts
Posted 13 years ago on Tuesday May 24, 2011 |
Permalink