<?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: Gravity_form_enqueue_scripts</title>
		<link>https://legacy.forums.gravityhelp.com/topic/gravity_form_enqueue_scripts</link>
		<description>Gravity Support Forums Topic: Gravity_form_enqueue_scripts</description>
		<language>en-US</language>
		<pubDate>Sun, 12 Apr 2026 14:10:50 +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/gravity_form_enqueue_scripts" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Gravity_form_enqueue_scripts"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gravity_form_enqueue_scripts#post-43910</link>
			<pubDate>Tue, 13 Dec 2011 10:24:57 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">43910@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You could, but I think you might be over thinking it.  I'm not sure of the exact scenario where you would need this, but I suspect what you are trying to do it already possible within Gravity Forms.  The only times I use conditionals as you did is when I want to enqueue the scripts on specific pages or when specific page templates are being used, or when I want to apply the function to just one form.  If you post what you're trying to accomplish in a new topic, we'd be happy to help you work it out.  Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>GregR on "Gravity_form_enqueue_scripts"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gravity_form_enqueue_scripts#post-43880</link>
			<pubDate>Tue, 13 Dec 2011 03:11:07 +0000</pubDate>
			<dc:creator>GregR</dc:creator>
			<guid isPermaLink="false">43880@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@Chris Hajer&#60;/p&#62;
&#60;p&#62;Thank you very much for your replied&#60;/p&#62;
&#60;p&#62;yes using the head worked, since I'm new to Gravity Form, I was just trying to make sure I was doing the right way. &#60;/p&#62;
&#60;p&#62;it is the very same with WP, there is so many 'roads' that lead to the goal, but some are good use of WP logic while other are just twisted ways.. since I try to learn the best practise as much as possible, hence my question&#60;/p&#62;
&#60;p&#62;playing a bit more with the gravity form, I'm wondering if I'm not going to do a function based on page and fire each needed hook/filter for gravity form from this function&#60;/p&#62;
&#60;p&#62;doing something like below, would that be a smart way to code?&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;#39;wp_head&#38;#39;, &#38;#39;gr_gravity_form_init&#38;#39;);

function gr_gravity_form_init()
{
	if ( is_page(4)) //
	{
	gravity_form_enqueue_scripts(1, true);
	add_filter(&#38;quot;gform_validation_message_1&#38;quot;, &#38;quot;gr_gravity_form_nl_wrong_email&#38;quot;, 10, 2);
	}
}

function gr_gravity_form_nl_wrong_email($message){
  return &#38;quot;&#38;lt;span class=\&#38;quot;validation_error\&#38;quot;&#38;gt;Oups, there&#38;#39;s an error - please fill with a valid email !&#38;lt;/span&#38;gt;&#38;quot; ;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Thank you in advance
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Gravity_form_enqueue_scripts"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gravity_form_enqueue_scripts#post-43875</link>
			<pubDate>Tue, 13 Dec 2011 01:37:05 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">43875@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I believe that's the correct way.   There are so many ways it will actually work I am unsure of the absolute proper way.  wp_head() seems correct to me.    Here is another user's recent experience with doing it just like that (be sure to view the &#60;a href=&#34;http://pastebin.com/dC1Srath&#34; rel=&#34;nofollow&#34;&#62;pastebin link&#60;/a&#62;): &#60;a href=&#34;http://www.gravityhelp.com/forums/topic/gravity-form-enqueue-scripts-in-functionsphp-vs-headphp#post-43489&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/gravity-form-enqueue-scripts-in-functionsphp-vs-headphp#post-43489&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Have you tried it, and does it work?  If not, can you share a link to your page?  Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>GregR on "Gravity_form_enqueue_scripts"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gravity_form_enqueue_scripts#post-43868</link>
			<pubDate>Tue, 13 Dec 2011 00:46:00 +0000</pubDate>
			<dc:creator>GregR</dc:creator>
			<guid isPermaLink="false">43868@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@Chris Hajer&#60;/p&#62;
&#60;p&#62;Thank you for your help.&#60;/p&#62;
&#60;p&#62;shall I fire the wp_head or init hook?&#60;/p&#62;
&#60;p&#62;I have written something like&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function gr_gravity_form_enqueue_scripts()
{
	if ( is_page(4))
	{
	gravity_form_enqueue_scripts(1, true);
	}
}
add_action(&#38;#39;wp_head&#38;#39;, &#38;#39;gr_gravity_form_enqueue_scripts&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;is that the correct way?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Gravity_form_enqueue_scripts"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gravity_form_enqueue_scripts#post-43831</link>
			<pubDate>Mon, 12 Dec 2011 18:21:48 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">43831@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You can add a function to your theme's functions.php to include it conditionally, based on what page is being loaded or what page is being used.  Doing it in the template is too late to get it into the &#38;lt; head &#38;gt;.&#60;/p&#62;
&#60;p&#62;Regarding #2, you can turn off the CSS output with a checkbox in the form builder.  It's on the settings page in the Gravity Forms menu.  See here:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/File:Settings-page.png&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/File:Settings-page.png&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>GregR on "Gravity_form_enqueue_scripts"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gravity_form_enqueue_scripts#post-43806</link>
			<pubDate>Mon, 12 Dec 2011 16:46:53 +0000</pubDate>
			<dc:creator>GregR</dc:creator>
			<guid isPermaLink="false">43806@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Greetings, &#60;/p&#62;
&#60;p&#62;I'm totaly new to gravity form, I'm currently playing with a simple one line form (newsletter subscribtion) while reading the documentation to try to understand how it works. &#60;/p&#62;
&#60;p&#62;I'm mostly trying to style it and see the different behaviors, so  far so good&#60;/p&#62;
&#60;p&#62;I'm inserting the form directly in my template&#60;/p&#62;
&#60;p&#62;I have a couple of questions&#60;/p&#62;
&#60;p&#62;so that I use the documentation on&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gravity_form_enqueue_scripts&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gravity_form_enqueue_scripts&#60;/a&#62;&#60;br /&#62;
 it is said that the enqueue has to be added to the header...&#60;br /&#62;
1° is it possible to add it from my template page using a hook? so that the &#60;code&#62;gravityforms/css/forms.css?ver=1.6.1&#60;/code&#62; is only added to needed page&#60;br /&#62;
what about if I put it onto the functions.php with an if statement to pust it only for a given page?&#60;/p&#62;
&#60;p&#62;2° assuming that I want to fully style from my templace style.css, is there a way to avoid the gravity form own css to be displayed? I understand from some post in this forum that it is a configuration on the admin panel, but just can't find it&#60;/p&#62;
&#60;p&#62;thank you very much in advance
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
