hi
I have a page with GF installed https://menupot.com/your-deatils
It is set to use "plain page" template.
One of the items is set for to show on a radio button check.
When i switch on the condition the whole form disappears.
Thanks
Mark
hi
I have a page with GF installed https://menupot.com/your-deatils
It is set to use "plain page" template.
One of the items is set for to show on a radio button check.
When i switch on the condition the whole form disappears.
Thanks
Mark
Can't see your form. http://bit.ly/IfQhZU
It sounds like you haven't set up your conditional logic correctly, but it's hard to say without seeing the form.
Hi
I'am fairly sure that my logic is set up correctly as if I use the default tempalte rather than "plain page" it works fine.
Any suggestion?
if you can send me you ip address I add you to the white list
Thanks
Thanks
Mark
okay, sounds like you may not be enqueuing the scripts properly in your "plain page". When you view the markup, is there a "display:none" inline style on the form?
You'll want to make sure the wp_footer is included properly
or else you'll need to hard code the paths to the correct js files.. notably the conditional_logic.js file.
Hi
Thanks for the link, i cheked the page template and its there
<?php
/*
Template Name: plain page
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<meta http-equiv="Imagetoolbar" content="No" />
<title>My Form Title</title>
<style type="text/css">
body {font-size:13px;}
</style>
<link rel='stylesheet' id='gforms_css-css' href='<?php bloginfo('url'); ?>/wp-content/plugins/gravityforms/css/forms.css?ver=3.0.1' type='text/css' media='all' />
<script type='text/javascript' src='<?php bloginfo('stylesheet_directory'); ?>/includes/js/jquery-142.js?ver=1.4.1'></script>
<script type='text/javascript' src='<?php bloginfo('url'); ?>/wp-content/plugins/gravityforms/js/conditional_logic.js?ver=1.3.13.1'></script>
</head>
<body>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content('read more'); ?>
<?php endwhile; endif; ?>
<?php wp_footer(); ?>
</body>
</html>
any ideas?
You're loading a very old version of jQuery, which I'm guessing is a big factor in the problems you're encountering. You can download the latest here: Downloading jQuery.
Really the template is not designed very well - you should be using wp_enqueue_script for your js and wp_enqueue_style for your styles, but I'm going to assume you've got a good reason not to.
The reason the "wp_enqueue_script" and "wp_enqueue_style" functions aren't used in that example is that we only wanted to load Gravity Forms scripts/CSS on that page and not all the other scripts/styles added by the theme or other plugins. The omission was intentional.
I'm guessing Mark grabbed this example from a 2 year old post and didn't know to update the jQuery version or just didn't notice it.
HI
Okay, but how do i fix?
Thanks
Mark
Replace this line:
<script type='text/javascript' src='<?php bloginfo('stylesheet_directory'); ?>/includes/js/jquery-142.js?ver=1.4.1'></script>
with:
<script type='text/javascript' src='/wp-includes/js/jquery/jquery.js?ver=1.7.1'></script>
That's assuming you're using the latest version of WordPress. If you're not, you could replace it with this instead:
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js?ver=1.7.1'></script>
thanks,
that worked
Mark
Glad to hear it all got sorted out.