<?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: Setting post_data value to an array</title>
		<link>https://legacy.forums.gravityhelp.com/topic/setting-post_data-value-to-an-array</link>
		<description>Gravity Support Forums Topic: Setting post_data value to an array</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 00:53:10 +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/setting-post_data-value-to-an-array" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Setting post_data value to an array"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/setting-post_data-value-to-an-array#post-160245</link>
			<pubDate>Mon, 04 Mar 2013 17:55:07 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">160245@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you for the update.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>j3ph on "Setting post_data value to an array"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/setting-post_data-value-to-an-array#post-157127</link>
			<pubDate>Thu, 28 Feb 2013 19:01:30 +0000</pubDate>
			<dc:creator>j3ph</dc:creator>
			<guid isPermaLink="false">157127@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I never did find out the issue with this.&#60;/p&#62;
&#60;p&#62;I decided to make the call to update_post_meta() myself instead of relying on it happening somewhere else. This worked out just fine for my purposes.&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>j3ph on "Setting post_data value to an array"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/setting-post_data-value-to-an-array#post-152551</link>
			<pubDate>Fri, 22 Feb 2013 19:11:09 +0000</pubDate>
			<dc:creator>j3ph</dc:creator>
			<guid isPermaLink="false">152551@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Absolutely. &#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastebin.com/9rXUqGAa&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/9rXUqGAa&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Also here is the link to the form (not sure if it matters):&#60;br /&#62;
&#60;a href=&#34;http://inland360.com/your-voice/submit-an-event/&#34; rel=&#34;nofollow&#34;&#62;http://inland360.com/your-voice/submit-an-event/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Thanks for your time.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Setting post_data value to an array"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/setting-post_data-value-to-an-array#post-152539</link>
			<pubDate>Fri, 22 Feb 2013 18:57:12 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">152539@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you share the code you are using where it stores it as a serialized string if your serialized array?  Seems like it's probably something small we need to do to make this work.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>j3ph on "Setting post_data value to an array"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/setting-post_data-value-to-an-array#post-150325</link>
			<pubDate>Tue, 19 Feb 2013 14:00:57 +0000</pubDate>
			<dc:creator>j3ph</dc:creator>
			<guid isPermaLink="false">150325@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sorry for the slow response. For some reason I didn't receive an email notification about your posting.&#60;/p&#62;
&#60;p&#62;That is exactly correct. Sorry for the unclear posting earlier. Here's an example of how the value should look:&#60;br /&#62;
&#60;a href=&#34;http://prntscr.com/td7is&#34; rel=&#34;nofollow&#34;&#62;http://prntscr.com/td7is&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Thanks for your help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Setting post_data value to an array"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/setting-post_data-value-to-an-array#post-148865</link>
			<pubDate>Mon, 18 Feb 2013 01:19:40 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">148865@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sounds like you want to store the array literally in a custom field called _DURATION.  What should that value look like in the post_meta table? (do you have examples of values already stored there correctly?) I assume some other plugin or function needs the data in that format to function properly.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>j3ph on "Setting post_data value to an array"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/setting-post_data-value-to-an-array#post-147353</link>
			<pubDate>Fri, 15 Feb 2013 16:11:26 +0000</pubDate>
			<dc:creator>j3ph</dc:creator>
			<guid isPermaLink="false">147353@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Guys,&#60;br /&#62;
I'm sure I'm doing this wrong, but I'm stuck. &#60;/p&#62;
&#60;p&#62;I'm using pre_submission_filter to change the value of a hidden field to an array. &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$time = array( &#38;#39;hours&#38;#39; =&#38;gt; 2);
$post_data[&#38;#39;post_custom_fields&#38;#39;][&#38;#39;_DURATION&#38;#39;] = $time;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The problem is if I don't serialize the $time then _DURATION is set to 2 (the value of the first key in $time). If I do serialize $time then _DURATION is set to s:26;&#34;a:1:{5:&#34;hours;s:1&#34;2&#34;;}&#34;; (a serialized string of my serialized array :)&#60;/p&#62;
&#60;p&#62;Like I said, I'm sure I'm doing something really really wrong here, but I'm going mad trying to figure this one out.&#60;/p&#62;
&#60;p&#62;Can anyone help?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
