The issue is how the shortcode enqueues the necessary Javascript for the conditional logic to work. It won't automatically do it when using the MCB plugin because of how WordPress and the MBC plugin works.
The workaround for this is to add code to your theme to manually enqueue the necessary Javascript.
For Gravity Forms v1.4.5 and earlier you would add the necessary code to enqueue the JS and CSS to your themes functions.php file. It would look like this:
if(!is_admin()){
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");
}
If you are running Gravity Forms v1.5 then the code may be slightly different, we've implemented a function in the latest release that you would call and it will then automatically enqueue the necessary JS for the form you are displaying. I can provide that if necessary.
Posted 14 years ago on Wednesday December 22, 2010 |
Permalink