Travis, the forms are working normally now.
When you add forms via the function call in the page template, or in the sidebar using a widget, etc, you have to manually add some script to your functions file to enqueue the necessary scripts and styles for the forms. This is done automatically for you when you add a form using the shortcode in the post editor.
I added this to your functions.php file
// enqueue the scripts and styles needed for Gravity Forms placed outside the loop
wp_enqueue_script("gforms_ui_datepicker", WP_PLUGIN_URL . "/gravityforms/js/jquery-ui/ui.datepicker.js", array("jquery"), "1.3.9", true);
wp_enqueue_script("gforms_datepicker", WP_PLUGIN_URL . "/gravityforms/js/datepicker.js", array("gforms_ui_datepicker"), "1.3.9", true);
wp_enqueue_script("gforms_conditional_logic_lib", WP_PLUGIN_URL . "/gravityforms/js/conditional_logic.js", array("gforms_ui_datepicker"), "1.3.9", true);
wp_enqueue_style("gforms_css", WP_PLUGIN_URL . "/gravityforms/css/forms.css");
Now, the CSS and scripts are loaded on any page that has a form and they won't load on pages that don't.
I removed the hard-coded css reference (the path was still off btw) from the header.php file as it's not needed.
If you want to tweak the styles, remember to put your custom CSS in with your theme styles and not to directly modify the forms.css file in the plugin folder. That file is replaced during the update process and if you make changes there, you may lose them when updating.
Posted 14 years ago on Thursday May 27, 2010 |
Permalink