Please Note: We are no longer using forums to facilitate standard support. 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.

Form won't show up on page, it just shows the code.

  1. LiveFree88
    Member

    After setting up a form and inputting it into my site, it is only showing the code on my site not the form? Here is the site I am talking about. In the left column is where the form should be.

    http://www.telcoquotes.com/

    I can input HTML in that sidebar and it works fine, but for some reason the gravity code doesn't work.

    Posted 3 years ago on Wednesday October 12, 2011 | Permalink
  2. You can't embed the shortcode outside of the content editor and expect it to work. If your sidebar supports widgets, then you can use the built-in Form widget that you'll find in the widget admin page to add your Gravity Form to the sidebar.

    If you form isn't widgetized and you're just putting HTML into the page template, then you'll need to use the function call method to embed the form directly into the page. If you do that, you'll need to manually enqueue the necessary scripts in your theme's header. php file so everything works properly.

    http://www.gravityhelp.com/documentation/page/Embedding_A_Form

    http://www.gravityhelp.com/documentation/page/Gravity_form_enqueue_scripts

    My suggestion is to use the form widget there if possible.

    Posted 3 years ago on Wednesday October 12, 2011 | Permalink
  3. LiveFree88
    Member

    I tried following the instructions and added the following code in the header.php like so:

    <?php gravity_form_enqueue_scripts(1, false); ?>
    <?php wp_head(); ?>
    <?php woo_head(); ?>

    Then I added the following code where I want the form to show up.

    <?php gravity_form(1, false, false, false, '', false); ?>

    But I'm still not seeing the form? Did I do something wrong?

    Posted 3 years ago on Wednesday October 12, 2011 | Permalink
  4. Where did you put the function call? Because I see the function call on your site. And that is the problem. I shouldn't see the function call.

    You can only use function calls in theme template files. If you have placed the function call is WordPress content or somewhere else, it's not going to execute because it's PHP. PHP is only going to execute from the theme template file itself.

    Posted 3 years ago on Wednesday October 12, 2011 | Permalink
  5. LiveFree88
    Member

    I'm really confused now.. I'm use to Aweber where all I have to do is create a form and copy and past the HTML where I want it on my page and it works.

    So you're saying that I have to go into my theme files and try to figure out where to put the code? How am I suppose to know where to put it so it will show up where I want it on my page?

    And this is only half the battle, I still need to figure out how to get this from to integrate with my affiliate plugin.

    Posted 3 years ago on Wednesday October 12, 2011 | Permalink
  6. I used the "Widgets to Pages" plugin. Worked great.

    Posted 3 years ago on Thursday October 13, 2011 | Permalink
  7. So you're saying that I have to go into my theme files and try to figure out where to put the code?

    Yes, Gravity Forms isn't Aweber and doesn't work the same way. You can't just paste the HTML anywhere in your page. You have to embed the shortcode in the WordPress content editor so it displays in the content area or if you want to use the form outside of the content area such as a sidebar, footer, header, etc. - That region has to support WordPress widgets or else you have to include the PHP function call in the page/template markup so the form loads there properly.

    If you're not sure how to edit your theme to place your form, you can probably contact your theme developer for guidance or you might be better off hiring a qualified developer to help you make theme customizations. There's a list of folks you might consider here.

    http://wpcandy.com/pros/experienced/with-gravity-forms

    I'm not familiar with the "Widgets to Pages" plugin the other member mentioned so I can't vouch for it or offer any real guidance on that.

    Posted 3 years ago on Thursday October 13, 2011 | Permalink
  8. LiveFree88
    Member

    So here is what I ended up doing to work around the shortcode issue. I made a form using the plugin and then I pasted the shortcode into a "dummy" page. I then previewed the page so I could see the form. I then looked at the source code of the page and copied the HTML code from the page for the form. Starting with <form method and ending with </form> I then took that HTML and pasted it into my page where I wanted the form to go and bam, it worked. I was also able to put the code into an HTML editor and edit the form to my liking by adding images and extending the length of the input fields.

    For me, this was much easier to do than mess with all of the function calls and theme templates. I have no idea what all of that stuff means, and seemed like it was too confusing to have to mess with all of that.

    Posted 3 years ago on Friday October 14, 2011 | Permalink

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

Support Tickets

Open A New Support Ticket
 Open A New Priority Support Ticket *

* Developer license holders only