<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: How do I send dynamic values with the gravity_form() function?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/how-do-i-send-dynamic-values-with-the-gravity_form-function</link>
		<description>Gravity Support Forums Topic: How do I send dynamic values with the gravity_form() function?</description>
		<language>en-US</language>
		<pubDate>Thu, 23 Apr 2026 18:28:19 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/how-do-i-send-dynamic-values-with-the-gravity_form-function" rel="self" type="application/rss+xml" />

		<item>
			<title>marketmike on "How do I send dynamic values with the gravity_form() function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-do-i-send-dynamic-values-with-the-gravity_form-function#post-11536</link>
			<pubDate>Fri, 22 Oct 2010 22:23:46 +0000</pubDate>
			<dc:creator>marketmike</dc:creator>
			<guid isPermaLink="false">11536@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks Kevin
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sevendayweekend on "How do I send dynamic values with the gravity_form() function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-do-i-send-dynamic-values-with-the-gravity_form-function#post-10889</link>
			<pubDate>Thu, 07 Oct 2010 09:08:27 +0000</pubDate>
			<dc:creator>sevendayweekend</dc:creator>
			<guid isPermaLink="false">10889@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ahah! I see now.&#60;/p&#62;
&#60;p&#62;For others, here is an example of setting field values with the function:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;gravity_form(1, false, false, array(&#38;#39;myfieldname&#38;#39;=&#38;gt;&#38;#39;Hello World&#38;#39;) );&#60;/code&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Kevin Flahaut on "How do I send dynamic values with the gravity_form() function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-do-i-send-dynamic-values-with-the-gravity_form-function#post-10887</link>
			<pubDate>Thu, 07 Oct 2010 09:01:13 +0000</pubDate>
			<dc:creator>Kevin Flahaut</dc:creator>
			<guid isPermaLink="false">10887@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;We're working on some really extensive documentation and it should be ready to release shortly. Here's the run down on the embed options using the function...&#60;/p&#62;
&#60;p&#62;If you would like to call a form from within a WordPress theme file, you may do so using a function call. The function and it's available parameters are outlined below.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php gravity_form($id, $display_title=true, $display_description=true, $display_inactive=false, $field_values=null, $ajax=false); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;$id&#60;br /&#62;
(integer) (required) The id of the form to be embedded.&#60;/p&#62;
&#60;p&#62;$display_title&#60;br /&#62;
(boolean) (optional) Whether or not do display the form title.&#60;br /&#62;
Defaults to false.&#60;/p&#62;
&#60;p&#62;$display_description&#60;br /&#62;
(boolean) (optional) Whether or not do display the form description.&#60;br /&#62;
Defaults to false.&#60;/p&#62;
&#60;p&#62;$display_inactive&#60;br /&#62;
(boolean) (optional) Whether or not to display the form even if it is inactive.&#60;br /&#62;
Defaults to false.&#60;/p&#62;
&#60;p&#62;$field_values&#60;br /&#62;
(array) (optional)&#60;br /&#62;
Defaults to false.&#60;/p&#62;
&#60;p&#62;$ajax&#60;br /&#62;
(boolean) (optional) Whether or not to use AJAX for form submission.&#60;br /&#62;
Defaults to false.&#60;/p&#62;
&#60;p&#62;Usage Examples&#60;br /&#62;
---------------------------------&#60;/p&#62;
&#60;p&#62;Basic Function Call&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php gravity_form(1, false, false, false, &#38;#39;&#38;#39;, false); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;This snippet will display the form with an id of '1'; the title and description will not be displayed, the form itself will not display if it is inactive, and it will not use AJAX for form submission.&#60;/p&#62;
&#60;p&#62;With Ajax&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php gravity_form(1, false, false, false, &#38;#39;&#38;#39;, true); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;This snippet will display the exact same form as above except it will use AJAX for form submission.&#60;/p&#62;
&#60;p&#62;Enqueue Scripts and Styles&#60;/p&#62;
&#60;p&#62;When embedding a form via a function call you must also manually include the necessary Gravity Forms related Javascript and CSS via the built in WordPress enqueue capabilities. Gravity Forms does not include these by default when calling a form via a function call and they are necessary for forms that contain conditional logic or the date picker field.&#60;/p&#62;
&#60;p&#62;We strongly recommend you enqueue the scripts rather than including them as hardcoded calls in your theme. Implementing it this way will insure that Gravity Forms does not include them on the page if they are already present. It is also a good practice to only load these scripts on the front end.&#60;/p&#62;
&#60;p&#62;By default, the wp_enqueue_script function will load the scripts in both the front and back end. To avoid this, we advise checking to make sure you are not inside the admin by using another built in WordPress function is_admin().&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
if(!is_admin()) {
    wp_enqueue_script(&#38;quot;gforms_ui_datepicker&#38;quot;, WP_PLUGIN_URL . &#38;quot;/gravityforms/js/jquery-ui/ui.datepicker.js&#38;quot;, array(&#38;quot;jquery&#38;quot;), &#38;quot;1.4&#38;quot;, true);
    wp_enqueue_script(&#38;quot;gforms_datepicker&#38;quot;, WP_PLUGIN_URL . &#38;quot;/gravityforms/js/datepicker.js&#38;quot;, array(&#38;quot;gforms_ui_datepicker&#38;quot;), &#38;quot;1.4&#38;quot;, true);
    wp_enqueue_script(&#38;quot;gforms_conditional_logic_lib&#38;quot;, WP_PLUGIN_URL . &#38;quot;/gravityforms/js/conditional_logic.js&#38;quot;, array(&#38;quot;gforms_ui_datepicker&#38;quot;), &#38;quot;1.4&#38;quot;, true);
    wp_enqueue_style(&#38;quot;gforms_css&#38;quot;, WP_PLUGIN_URL . &#38;quot;/gravityforms/css/forms.css&#38;quot;);
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>sevendayweekend on "How do I send dynamic values with the gravity_form() function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-do-i-send-dynamic-values-with-the-gravity_form-function#post-10884</link>
			<pubDate>Thu, 07 Oct 2010 08:30:11 +0000</pubDate>
			<dc:creator>sevendayweekend</dc:creator>
			<guid isPermaLink="false">10884@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm surprised this code is not better explained in the Function Call section on this documentation page: &#60;a href=&#34;http://www.gravityhelp.com/documentation/embedding-a-form/&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/embedding-a-form/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sevendayweekend on "How do I send dynamic values with the gravity_form() function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-do-i-send-dynamic-values-with-the-gravity_form-function#post-10883</link>
			<pubDate>Thu, 07 Oct 2010 08:28:38 +0000</pubDate>
			<dc:creator>sevendayweekend</dc:creator>
			<guid isPermaLink="false">10883@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi there,&#60;/p&#62;
&#60;p&#62;For some reason, I can't find the documentation on how to send my values to dynamic fields using the gravity_form() function. I see plenty of examples using the shortcode, but nothing about the function. I even searched on Google and came up empty handed.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
