Is it possible to add gravity form in the sidebar of the wordpress blog?
Is it possible to add gravity form in the sidebar of the wordpress blog?
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.
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
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.
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?
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.