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.

Plain form page template

  1. Hi there, I'm trying to create a plain form page template for my site so that I can IFRAME the form on another domain. However, when I try and use conditional fields, my form disappears. When conditional fields are set the form adds a style display: none to the main wrapper div. If I display the form in preview or from a proper theme page it's fine because it uses wp_head() to create the header code. There are clearly some codes that Gravity Forms missing from my page template. Can you tell me what they are?

    <?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>Plain Page</title>
    		<link rel='stylesheet' id='gforms_css-css'  href='<?php bloginfo('wpurl'); ?>/wp-content/plugins/gravityforms/css/forms.css?ver=1.6.5' type='text/css' media='all' />
    		<script type='text/javascript' src='<?php bloginfo('wpurl'); ?>/wp-includes/js/jquery/jquery.js?ver=1.7.2'></script>
    		<script type='text/javascript' src='<?php bloginfo('wpurl'); ?>/wp-content/plugins/gravityforms/js/gravityforms.js?ver=1.6.5'></script>
    		<script type='text/javascript' src='<?php bloginfo('wpurl'); ?>/wp-content/plugins/gravityforms/js/conditional_logic.js?ver=1.6.5'></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>
    Posted 12 years ago on Monday July 30, 2012 | Permalink
  2. Can you not use wp_head() on your blank page template? I'd assume you don't want to to save on unnecessary output... Have you tried viewing the source of the preview window and your iframed page to compare?

    Posted 12 years ago on Monday July 30, 2012 | Permalink
  3. Correct, wp_head prints a lot of unnecessary stuff that needn't be loaded in the IFRAME.

    Been viewing source all morning and cannot find what I'm missing.

    Posted 12 years ago on Monday July 30, 2012 | Permalink
  4. You could try enqueuing scripts and styles for this form:
    http://www.gravityhelp.com/documentation/page/Gravity_form_enqueue_scripts

    I have not tried this without the presence of wp_head(), but could be worth a shot for you.

    Posted 12 years ago on Monday July 30, 2012 | Permalink
  5. Nope, didn't work. Here is the page: http://www.webshop.bb/forms/atlantis-wedding-enquiries/ . The form should be invisible, so you'll need to view source to find it.

    Posted 12 years ago on Monday July 30, 2012 | Permalink
  6. I think you still need wp_head() for gravity_form_enqueue_scripts() to work.

    Posted 12 years ago on Monday July 30, 2012 | Permalink
  7. It looks like everything is also getting output in your footer. You have a lot of duplicates, including your jQuery call. Most of the Gravity Forms scripts should be in the head along with jQuery. My guess is it's possibly outputting some of them in the footer since wp_head() is omitted.

    Posted 12 years ago on Monday July 30, 2012 | Permalink
  8. Ah! Genius! I removed wp_footer and it started working again! Thanks!

    Posted 12 years ago on Monday July 30, 2012 | Permalink
  9. Nice! Glad to help out.

    Posted 12 years ago on Monday July 30, 2012 | Permalink

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