<?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: Please can you give me some example code for post submission hook usage</title>
		<link>https://legacy.forums.gravityhelp.com/topic/please-can-you-give-me-some-example-code-for-post-submission-hook-usage</link>
		<description>Gravity Support Forums Topic: Please can you give me some example code for post submission hook usage</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 07:12:58 +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/please-can-you-give-me-some-example-code-for-post-submission-hook-usage" rel="self" type="application/rss+xml" />

		<item>
			<title>lukebream on "Please can you give me some example code for post submission hook usage"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/please-can-you-give-me-some-example-code-for-post-submission-hook-usage#post-25453</link>
			<pubDate>Thu, 12 May 2011 20:07:16 +0000</pubDate>
			<dc:creator>lukebream</dc:creator>
			<guid isPermaLink="false">25453@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi&#60;br /&#62;
I just wanted to say I have solved this issue and have everything working correctly.&#60;/p&#62;
&#60;p&#62;For others who have a similar issue the code I used is as follows:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//Process the edit-submitted-post gravity form entries..
add_action(&#38;quot;gform_post_submission_3&#38;quot;, &#38;quot;form_update_post_meta&#38;quot;, 10, 2);
function form_update_post_meta($entry,$form){
$targetPost = $_GET[&#38;#39;postID&#38;#39;];
global $wpdb;
$screen1title = $entry[&#38;quot;3&#38;quot;];
$wpdb-&#38;gt;query(&#38;quot;UPDATE $wpdb-&#38;gt;postmeta SET meta_value= &#38;#39;$screen1title&#38;#39; WHERE post_id=$targetPost AND meta_key=&#38;#39;slide_1_title&#38;#39;&#38;quot;);
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>lukebream on "Please can you give me some example code for post submission hook usage"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/please-can-you-give-me-some-example-code-for-post-submission-hook-usage#post-25410</link>
			<pubDate>Thu, 12 May 2011 12:25:41 +0000</pubDate>
			<dc:creator>lukebream</dc:creator>
			<guid isPermaLink="false">25410@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi&#60;/p&#62;
&#60;p&#62;Im building a form to edit post meta data. I'm presuming the setup will be as follows.&#60;/p&#62;
&#60;p&#62;1)  Pass the postID to a hidden field via the URL on which the form is located&#60;/p&#62;
&#60;p&#62;2. Prepopulate the form fields with the existing post-meta fields. (I have this setup already so no questions about this)&#60;/p&#62;
&#60;p&#62;3. On form submit use the post submission hook to call a &#34;example-processing.php&#34; file where I handle the relevant database entriees to add the details tto the wp_postmeta table&#60;/p&#62;
&#60;p&#62;//////////////&#60;/p&#62;
&#60;p&#62;So if the above is correct I have the following questions:&#60;/p&#62;
&#60;p&#62;1. Can you provide a brief code example for how to use the post submission hook in these circumstances&#60;/p&#62;
&#60;p&#62;2. Can you provide a brief code example for how to reference the data inside my &#34;example-processing.php&#34; file. I have no problem with the subsequent database entries once I have the variables declared in this file.&#60;/p&#62;
&#60;p&#62;Thanks  as always for your help&#60;/p&#62;
&#60;p&#62;Luke
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
