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.

Form in the sidebar of wordpress

  1. Is it possible to add gravity form in the sidebar of the wordpress blog?

    Posted 10 years ago on Monday May 10, 2010 | Permalink
  2. You can add a Gravity Form to your sidebar manually with a function call or by using something like the Gravity Forms Widget from Yoast.

    In both cases, you'll need to add a little script to your functions.php file to enqueue all of the necessary Gravity Forms stylesheets and scripts. You can find more information about embedding a form in the documentation.

    Posted 10 years ago on Monday May 10, 2010 | Permalink
  3. benclowney
    Member

    Hi am having trouble with - am a complete novice when it comes to PHP. Are you able to set out exactly what I need to do to fix the sidebar formatting problems?

    I tried copying and pasting the code from your link above into my functions.php file, but it caused problems. Does it need extra code around it?

    Many thanks

    Posted 10 years ago on Wednesday May 12, 2010 | Permalink
  4. It needs to be wrapped with an opening and closing php tag..

    <?php
    
    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");
    
    ?>

    usually, themes already have some code in the functions.php file and you simply include the code snippet between the tags.

    Posted 10 years ago on Wednesday May 12, 2010 | Permalink
  5. benclowney
    Member

    Hi again - sorry, must be doing something wrong. I've pasted that code into functions.php and it hasn't made any difference. Output CSS is turned on. Is there anything else I should be doing?

    Posted 10 years ago on Friday May 14, 2010 | Permalink
  6. Contact me via email at carl-at-rocketgenius.com and email me your functions.php file as an attachment and i'll take a look at it.

    Posted 10 years ago on Friday May 14, 2010 | Permalink