PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

conditional show

  1. 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

    Posted 12 years ago on Friday April 13, 2012 | Permalink
  2. 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.

    Posted 12 years ago on Friday April 13, 2012 | Permalink
  3. 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

    Posted 12 years ago on Friday April 13, 2012 | Permalink
  4. 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

    http://www.gravityhelp.com/question/why-is-there-a-style-attribute-of-displaynone-being-added-my-form-isnt-showing-up/

    or else you'll need to hard code the paths to the correct js files.. notably the conditional_logic.js file.

    Posted 12 years ago on Friday April 13, 2012 | Permalink
  5. 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?

    Posted 12 years ago on Friday April 13, 2012 | Permalink
  6. kyle
    Member

    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.

    Posted 12 years ago on Friday April 13, 2012 | Permalink
  7. 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.

    Posted 12 years ago on Saturday April 14, 2012 | Permalink
  8. HI

    Okay, but how do i fix?

    Thanks

    Mark

    Posted 12 years ago on Saturday April 14, 2012 | Permalink
  9. kyle
    Member

    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>

    Posted 12 years ago on Saturday April 14, 2012 | Permalink
  10. thanks,

    that worked

    Mark

    Posted 12 years ago on Saturday April 14, 2012 | Permalink
  11. David Peralty

    Glad to hear it all got sorted out.

    Posted 12 years ago on Monday April 16, 2012 | Permalink

This topic has been resolved and has been closed to new replies.