<?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: Change Custom Field / Multi-Select output (to work with Advanced Custom Fields)</title>
		<link>https://legacy.forums.gravityhelp.com/topic/change-custom-field-multi-select-output-to-work-with-advanced-custom-fields</link>
		<description>Gravity Support Forums Topic: Change Custom Field / Multi-Select output (to work with Advanced Custom Fields)</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 12:44:41 +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/change-custom-field-multi-select-output-to-work-with-advanced-custom-fields" rel="self" type="application/rss+xml" />

		<item>
			<title>David Peralty on "Change Custom Field / Multi-Select output (to work with Advanced Custom Fields)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-custom-field-multi-select-output-to-work-with-advanced-custom-fields#post-65835</link>
			<pubDate>Wed, 11 Jul 2012 17:53:26 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">65835@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You will have to in the gform_pre_submission grab the details, strip things out, merge them together using PHP and then send them back to the form as one string. This would be reasonably complex to do, but a skilled PHP developer could create this add-on for you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cmccrone on "Change Custom Field / Multi-Select output (to work with Advanced Custom Fields)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-custom-field-multi-select-output-to-work-with-advanced-custom-fields#post-65832</link>
			<pubDate>Wed, 11 Jul 2012 17:48:11 +0000</pubDate>
			<dc:creator>cmccrone</dc:creator>
			<guid isPermaLink="false">65832@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Same issue. I wanted to use multi select with GF to create custom fields. Lets say my custom field is called &#34;colors&#34;. It currently adds them individually and only displays the first one on the post/page.&#60;/p&#62;
&#60;p&#62;Field Name: Colors   Value: Red&#60;br /&#62;
Field Name: Colors   Value: Blue&#60;br /&#62;
Field Name: Colors   Value: Green&#60;/p&#62;
&#60;p&#62;How can i make it like this:&#60;/p&#62;
&#60;p&#62;Field Name: Colors   Value: Red, blue, green&#60;/p&#62;
&#60;p&#62;OR with returns&#60;/p&#62;
&#60;p&#62;Field Name: Colors   Value: Red&#60;br /&#62;
                                           Blue&#60;br /&#62;
                                           Green
&#60;/p&#62;</description>
		</item>
		<item>
			<title>schnettker on "Change Custom Field / Multi-Select output (to work with Advanced Custom Fields)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-custom-field-multi-select-output-to-work-with-advanced-custom-fields#post-57949</link>
			<pubDate>Mon, 07 May 2012 08:45:52 +0000</pubDate>
			<dc:creator>schnettker</dc:creator>
			<guid isPermaLink="false">57949@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;okay ... i found a solution without any hooks or filters but the solution isn't nice because i can't upgrade the plugin&#60;/p&#62;
&#60;p&#62;i modify your forms_model.php (line 1745 and more)&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;case &#38;quot;checkbox&#38;quot; :
                        $value = explode(&#38;quot;,&#38;quot;, $value);
						$arr = array();
                        if(is_array($value)){
                            foreach($value as $item){
                                if(!rgblank($item))
                                    $arr[]=$item;
                            }
							add_post_meta($post_id, $meta_name, $arr);
                        }
                    break;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;is their a way to put the code on a other place?&#60;/p&#62;
&#60;p&#62;Btw. my solution gives a clean output in the backend and works with all my other plugins and templates
&#60;/p&#62;</description>
		</item>
		<item>
			<title>schnettker on "Change Custom Field / Multi-Select output (to work with Advanced Custom Fields)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-custom-field-multi-select-output-to-work-with-advanced-custom-fields#post-57946</link>
			<pubDate>Mon, 07 May 2012 08:13:57 +0000</pubDate>
			<dc:creator>schnettker</dc:creator>
			<guid isPermaLink="false">57946@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;i analysed the data in $post_data (in my  GForm_post_data function) and found the following&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;Array
(
    [post_custom_fields] =&#38;gt; Array
        (
           [preise] =&#38;gt; a:2:{i:0;s:4:&#38;quot;geld&#38;quot;;i:1;s:4:&#38;quot;ipad&#38;quot;;}
        )
)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That is the wanted result! Why it change to&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;s:36:&#38;quot;a:2:{i:0;s:4:&#38;quot;geld&#38;quot;;i:1;s:4:&#38;quot;ipad&#38;quot;;}&#38;quot;;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;?&#60;/p&#62;
&#60;p&#62;Where can i stop the conversion?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>schnettker on "Change Custom Field / Multi-Select output (to work with Advanced Custom Fields)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-custom-field-multi-select-output-to-work-with-advanced-custom-fields#post-57689</link>
			<pubDate>Fri, 04 May 2012 01:48:47 +0000</pubDate>
			<dc:creator>schnettker</dc:creator>
			<guid isPermaLink="false">57689@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;HI, in your example (GForm_post_data) i only see the possibility to change standard post fields. But in my case i have a custom field to manipulate.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Change Custom Field / Multi-Select output (to work with Advanced Custom Fields)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-custom-field-multi-select-output-to-work-with-advanced-custom-fields#post-57665</link>
			<pubDate>Thu, 03 May 2012 17:01:07 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">57665@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yea, I see the issue. The string is getting serialized again. The problem is that the extra serialization is coming from WordPress. What I would suggest is that you use the gform_post_data filter instead. This filter you will give you total control on how the post is created and you can manipulate the data to fit your needs.&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_post_data&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_post_data&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>schnettker on "Change Custom Field / Multi-Select output (to work with Advanced Custom Fields)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-custom-field-multi-select-output-to-work-with-advanced-custom-fields#post-57547</link>
			<pubDate>Thu, 03 May 2012 04:13:59 +0000</pubDate>
			<dc:creator>schnettker</dc:creator>
			<guid isPermaLink="false">57547@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sorry for my bad english. It seems you don't understand my Problem.&#60;/p&#62;
&#60;p&#62;If i chose checkboxes the gravity forms stores (if 2 checkboxes checked) the value like&#60;br /&#62;
name_of_field            value_1&#60;br /&#62;
name_of_field            value_2&#60;/p&#62;
&#60;p&#62;2 rows&#60;/p&#62;
&#60;p&#62;That is not nice but as david told i can fix it with gform_pre_submission_filter. Look at my code above - i did it allready! I create allready the wanted value (a:2:{i:0;s:4:&#34;ipad&#34;;i:1;s:6:&#34;iphone&#34;;} ) and in the mail i see that value (trailing after a dot). &#60;/p&#62;
&#60;p&#62;But when i look in the database, then i found a&#60;br /&#62;
s:35:&#34;a:2:{i:0;s:4:&#34;ipad&#34;;i:1;s:6:&#34;iphone&#34;;}&#34;;&#60;/p&#62;
&#60;p&#62;That is the serialized value of my wanted result. I don't understand why gravity form serialize that again!? If gravity form want a serialzied value, then why saving 2 rows? My data is perfectly in line 7 on my example above - but stored is another value
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Change Custom Field / Multi-Select output (to work with Advanced Custom Fields)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-custom-field-multi-select-output-to-work-with-advanced-custom-fields#post-57516</link>
			<pubDate>Wed, 02 May 2012 18:26:00 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">57516@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Gravity Forms stores custom field data this way when handling multi-value field types because it's a standard way of storing custom field data in WordPress.  &#60;/p&#62;
&#60;p&#62;You store multiple custom field values, using the same custom field key, and then you can pull all of them in to display them in your theme template by looking through the values that are pulled together as an array using built in WordPress functions.&#60;/p&#62;
&#60;p&#62;I understand you are unhappy with the situation, but the way Gravity Forms is doing things is not wrong or incorrect.  It's just that as with anything there are a variety of ways to accomplish the same thing.  Gravity Forms does it this way, ACF chose to do it another way.  &#60;/p&#62;
&#60;p&#62;What we can do is look into adding a hook to Gravity Forms that can be used to tell Gravity Forms to store the values as an array in a single custom field rather than as multiple custom fields.  I'll pass this along to our lead developer to see if this is something we can have implemented.&#60;/p&#62;
&#60;p&#62;In the mean time, what David suggested is definitely one way you can handle this.  If you need to store the values in a specific format so another plugin you are using can work with it, then you can do this by using the gform_pre_submission hook to manipulate the data.&#60;/p&#62;
&#60;p&#62;Gravity Forms itself stores data in a serialized format, so there could be some added complexity going on here that you could be encountering.&#60;/p&#62;
&#60;p&#62;I am going to forward this to our lead developer who will take a look at what you are doing and respond to you with some suggestions.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>schnettker on "Change Custom Field / Multi-Select output (to work with Advanced Custom Fields)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-custom-field-multi-select-output-to-work-with-advanced-custom-fields#post-57344</link>
			<pubDate>Wed, 02 May 2012 07:58:18 +0000</pubDate>
			<dc:creator>schnettker</dc:creator>
			<guid isPermaLink="false">57344@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;if i look in the backend form and the notification email then i found the expected result. &#60;/p&#62;
&#60;p&#62;a:2:{i:0;s:4:&#34;ipad&#34;;i:1;s:6:&#34;iphone&#34;;}&#60;/p&#62;
&#60;p&#62;Why modify gravity form a serialized string again?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>schnettker on "Change Custom Field / Multi-Select output (to work with Advanced Custom Fields)"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/change-custom-field-multi-select-output-to-work-with-advanced-custom-fields#post-56943</link>
			<pubDate>Mon, 30 Apr 2012 05:09:51 +0000</pubDate>
			<dc:creator>schnettker</dc:creator>
			<guid isPermaLink="false">56943@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Okay, it nearly works .... but ...&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_submission_filter_1&#38;quot;, &#38;quot;ser_preise&#38;quot;);
function ser_preise($form){
  /// some code
    $preise=maybe_serialize($preise);
     $_POST[&#38;quot;input_7_1&#38;quot;] = $preise;
    //Echo the array
    echo  $preise;
    return $form;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The Echo shows me the right result (a:2:{i:0;s:4:&#34;ipad&#34;;i:1;s:6:&#34;iphone&#34;;}) , but in database the result is&#60;/p&#62;
&#60;p&#62;s:35:&#34;a:2:{i:0;s:4:&#34;ipad&#34;;i:1;s:6:&#34;iphone&#34;;}&#34;;&#60;/p&#62;
&#60;p&#62;It seems there is another &#34;serialize&#34; on the data
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
