<?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: need help on how to use gform_save_field_value()</title>
		<link>https://legacy.forums.gravityhelp.com/topic/need-help-on-how-to-use-gform_save_field_value</link>
		<description>Gravity Support Forums Topic: need help on how to use gform_save_field_value()</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 07:13:56 +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/need-help-on-how-to-use-gform_save_field_value" rel="self" type="application/rss+xml" />

		<item>
			<title>ax10 on "need help on how to use gform_save_field_value()"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/need-help-on-how-to-use-gform_save_field_value#post-70796</link>
			<pubDate>Mon, 13 Aug 2012 05:05:04 +0000</pubDate>
			<dc:creator>ax10</dc:creator>
			<guid isPermaLink="false">70796@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes sorted thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "need help on how to use gform_save_field_value()"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/need-help-on-how-to-use-gform_save_field_value#post-66745</link>
			<pubDate>Tue, 17 Jul 2012 20:32:53 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">66745@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You can use whatever PHP function you like for encryption, and as you discovered, you can just swap out the function.  &#60;/p&#62;
&#60;p&#62;Does that resolve your issue?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ax10 on "need help on how to use gform_save_field_value()"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/need-help-on-how-to-use-gform_save_field_value#post-66672</link>
			<pubDate>Tue, 17 Jul 2012 12:10:17 +0000</pubDate>
			<dc:creator>ax10</dc:creator>
			<guid isPermaLink="false">66672@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ok - made some progress today (head must be feeling better).&#60;/p&#62;
&#60;p&#62;Thought I'd share an option incase anyone else finds it of any use.&#60;/p&#62;
&#60;p&#62;Problem: I wanted the captured form data to be encoded/encrypted in the database. Using the sample code gets you started but its only really base64encoded. Searching around I came across this article - &#60;a href=&#34;http://ideone.com/yQIAX&#34; rel=&#34;nofollow&#34;&#62;http://ideone.com/yQIAX&#60;/a&#62; which used &#34;mcrypt&#34;. &#60;/p&#62;
&#60;p&#62;So basically pop this code in - instead of the base64_encode... (note) you'll need the mcrypt extension for php enabled.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ax10 on "need help on how to use gform_save_field_value()"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/need-help-on-how-to-use-gform_save_field_value#post-66618</link>
			<pubDate>Tue, 17 Jul 2012 04:52:31 +0000</pubDate>
			<dc:creator>ax10</dc:creator>
			<guid isPermaLink="false">66618@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Chris,&#60;br /&#62;
Ok head is clearer this morning, I understand the '10,4' args in add_filter() now thanks. &#60;/p&#62;
&#60;p&#62;Also I'd blindly copied the code in the docs for gform_get_input_value example and there is an error in that the add_filter() is referencing a function called 'decode_field' but in sample code its called 'decrypt_field'... which gave me odd results. &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_get_input_value&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_get_input_value&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Ok with that out of the way; I presume that if I just (as per sample code)&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;return base64_encode($value)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;return base64_decode($value)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;in their respective functions every GF form and every field will get encoded/decoded right?&#60;/p&#62;
&#60;p&#62;Q1. Is this safe to use as is for advanced fields (name, address) and checkboxs/radio buttons? Do these need to be treated any differently?&#60;/p&#62;
&#60;p&#62;Q2. Any sample code on how to say just target a particular field within a specific form?&#60;/p&#62;
&#60;p&#62;Q3. Ideally I'd like to use some encryption code rather than base64 encoding - any suggestions?&#60;/p&#62;
&#60;p&#62;Many thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "need help on how to use gform_save_field_value()"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/need-help-on-how-to-use-gform_save_field_value#post-66595</link>
			<pubDate>Mon, 16 Jul 2012 23:53:41 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">66595@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;10 is the priority that the action runs at (default priority is 10) and 4 is the number of arguments the function will accept.  Please see the WordPress documentation here: &#60;a href=&#34;http://codex.wordpress.org/Function_Reference/add_filter&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Function_Reference/add_filter&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Once you have an understanding of the add_filter function, we'll take it from there.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ax10 on "need help on how to use gform_save_field_value()"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/need-help-on-how-to-use-gform_save_field_value#post-66558</link>
			<pubDate>Mon, 16 Jul 2012 18:58:11 +0000</pubDate>
			<dc:creator>ax10</dc:creator>
			<guid isPermaLink="false">66558@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;Rather late here and my brain is stuck. Basically I'm trying to understand how to use the gform_save_field_value() and gform_get_input_value() filters to&#60;br /&#62;
a) encode/encrypt an entire form or&#60;br /&#62;
b) just a particular field in a form.&#60;/p&#62;
&#60;p&#62;In the docs - what is 10, 4? I thought it was in relation to the field and form ids?&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php&#60;/code&#62;&#60;/pre&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_save_field_value&#38;quot;, &#38;quot;save_field_value&#38;quot;, 10, 4);&#60;/code&#62;&#60;/pre&#62;
&#60;pre&#62;&#60;code&#62;function save_field_value($value, $lead, $field, $form){&#60;/code&#62;&#60;/pre&#62;
&#60;pre&#62;&#60;code&#62;return base64_encode($value);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;}&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#60;/code&#62;&#60;/pre&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_get_input_value&#38;quot;, &#38;quot;decode_field&#38;quot;, 10, 4);&#60;/code&#62;&#60;/pre&#62;
&#60;pre&#62;&#60;code&#62;function decrypt_field($value, $lead, $field, $input_id){&#60;/code&#62;&#60;/pre&#62;
&#60;pre&#62;&#60;code&#62;return base64_decode($value);&#60;/code&#62;&#60;/pre&#62;
&#60;pre&#62;&#60;code&#62;}&#60;/code&#62;&#60;/pre&#62;
?&#38;gt;&#60;/p&#62;
&#60;p&#62;My form is at &#60;a href=&#34;http://tinyurl.com/bvrcqh5&#34; rel=&#34;nofollow&#34;&#62;http://tinyurl.com/bvrcqh5&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;My form ID is 2, and the 'Telephone' field is field ID 4. &#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
ax10
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
