<?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: Code in File</title>
		<link>https://legacy.forums.gravityhelp.com/topic/code-in-file</link>
		<description>Gravity Support Forums Topic: Code in File</description>
		<language>en-US</language>
		<pubDate>Thu, 23 Apr 2026 10:52:57 +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/code-in-file" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Code in File"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/code-in-file#post-2009</link>
			<pubDate>Sun, 06 Dec 2009 16:54:15 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">2009@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;That's excellent.  I have a need to do this myself, so this is great news.  Hope it works for Scott too.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Code in File"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/code-in-file#post-2000</link>
			<pubDate>Sun, 06 Dec 2009 15:06:03 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">2000@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You are right, that would work. You would want to put the update_option line in the gravityforms.php file, right under the call to &#60;/p&#62;
&#60;p&#62;&#60;code&#62;self::fix_checkbox_value();&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;so that it looks like the following:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;self::fix_checkbox_value();
   update_option(&#38;quot;rg_gforms_key&#38;quot;, md5(&#38;#39;your key here&#38;#39;));&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Code in File"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/code-in-file#post-1989</link>
			<pubDate>Sun, 06 Dec 2009 00:22:01 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">1989@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I would download the GF plugin today, add that code to $some_file so it runs on GF installation, then rezip the plugin.  Use that as your base for all installations.  If they're all done while the GF version is current, then it doesn't change anything.  Automatic updates would be fine because the option is stored in the database just as if you had typed it in manually.   You just install from your local copy rather than downloading it 50-100 times (which I don't think Scott would do anyway.)  Any problem doing it like that?&#60;/p&#62;
&#60;p&#62;You could run that &#60;em&#62;update_option&#60;/em&#62; with some sort of post installation hook or something, right?&#60;/p&#62;
&#60;p&#62;Doesn't really seem that complicated, other than knowing when to run that &#60;em&#62;update_option&#60;/em&#62;, post installation, unless I am overlooking something.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Code in File"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/code-in-file#post-1987</link>
			<pubDate>Sat, 05 Dec 2009 23:09:01 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">1987@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The support license key is stored in the wp_option table with the &#34;rg_gforms_key&#34; name.&#60;br /&#62;
So you could call:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;update_option(&#38;quot;rg_gforms_key&#38;quot;, md5(&#38;#39;your key here&#38;#39;));&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;to preload it, but I am not sure how this would save you time when you will have to write this code in all the sites anyways. It will probably be easier to type the key on the settings page.&#60;/p&#62;
&#60;p&#62;Scott's idea to keep it in a separate file could work, the problem is where would you save that file? it would have to be in a known location to Gravity Forms, but at the same time, it can't be in the gravityforms folder because the automatic upgrade would delete it.&#60;/p&#62;
&#60;p&#62;IAny suggestions.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Code in File"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/code-in-file#post-1984</link>
			<pubDate>Sat, 05 Dec 2009 16:21:46 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">1984@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I wonder if there's a way to modify GF after you download it to preset that support code, so when you install it on every site, the code is preloaded. I wonder if there's a way to do it so it's inserted to the database upon installation, every time.  You'd also need to remove the message that says &#34;go buy a support license&#34;.  I imagine with all the hooks built into GF that there is a way to do all this. I'm curious to know how as well.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Scott Hack on "Code in File"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/code-in-file#post-1983</link>
			<pubDate>Sat, 05 Dec 2009 03:48:36 +0000</pubDate>
			<dc:creator>Scott Hack</dc:creator>
			<guid isPermaLink="false">1983@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I realize this might not be something that a lot of people come across, but as I sit and think about building 50-100 websites this coming year that will use GF -- I am wondering if it would be possible to include my support code in a text file instead of having to input it each time... or can I export that with the forms from the database too?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
