<?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: After Submission Action Hook</title>
		<link>https://legacy.forums.gravityhelp.com/topic/after-submission-action-hook</link>
		<description>Gravity Support Forums Topic: After Submission Action Hook</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 12:00: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/after-submission-action-hook" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "After Submission Action Hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/after-submission-action-hook#post-193122</link>
			<pubDate>Mon, 01 Apr 2013 14:12:40 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">193122@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You're welcome.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alicewinthrop on "After Submission Action Hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/after-submission-action-hook#post-192819</link>
			<pubDate>Mon, 01 Apr 2013 10:17:33 +0000</pubDate>
			<dc:creator>alicewinthrop</dc:creator>
			<guid isPermaLink="false">192819@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you so much. That worked perfectly.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "After Submission Action Hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/after-submission-action-hook#post-191881</link>
			<pubDate>Sun, 31 Mar 2013 17:06:33 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">191881@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The problem is that $uniquename is not being returned by your gform_after_submission function, and if it were, it would not be related to the $uniquename used in your archive template.&#60;/p&#62;
&#60;p&#62;Are you using a content template for the posts you create with Gravity Forms? That will be the easiest way to get the poster's name into the content.  Another way to do it would be to store the poster's name as a custom field associated with the post, then in your archive.php template, you can pull the name from the postmeta with code like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
&#38;lt;?php
// this presumes you are storing the poster&#38;#39;s name
// in a custom field named &#38;#39;uniquename&#38;#39;
$uniquename = get_post_meta(get_the_ID(), &#38;#39;uniquename&#38;#39;, true);
if($uniquename != &#38;#39;&#38;#39;) {
  echo &#38;quot;&#38;lt;div class=&#38;#39;meta&#38;#39;&#38;gt;&#38;quot; . $uniquename . &#38;quot;&#38;lt;/div&#38;gt;&#38;quot;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This code is in your archive.php template and there is no need to use the gform_after_submission hook.  You need to be sure to store the poster's name in a post custom field with a key name of uniquename.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alicewinthrop on "After Submission Action Hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/after-submission-action-hook#post-186762</link>
			<pubDate>Wed, 27 Mar 2013 13:35:55 +0000</pubDate>
			<dc:creator>alicewinthrop</dc:creator>
			<guid isPermaLink="false">186762@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi there,&#60;/p&#62;
&#60;p&#62;The site I am developing needs two general user profiles: corporate and family. Each has a username and password which will be used by members of their respective groups. They do not want individual registration/login.&#60;/p&#62;
&#60;p&#62;I have set up a blog on the site with role-based access/display so the family see the family category archive and the corporates see the corporate category archive.&#60;/p&#62;
&#60;p&#62;I want the visitors to be able to post to the relevant &#34;blog&#34; so I created two forms and used conditional code in the archive.php to display the correct post entry form according to the category being displayed. All good. Form works well.&#60;/p&#62;
&#60;p&#62;Problem is I want to publish the poster's name on the blog and since they are logged in under a general group profile and not as an individual I can't use the_author and so on.&#60;/p&#62;
&#60;p&#62;I created a name field in the form and am trying to follow the after post submission function docs to pick up the data in that name field and assign it to $uniquename which I then echo in archive.php in the meta section. I can't get it to work. Here's my code:&#60;/p&#62;
&#60;p&#62;in functions.php:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
add_action(&#38;quot;gform_after_submission_3&#38;quot;, &#38;quot;after_submission&#38;quot;, 10, 2);
function after_submission($entry, $form){
    $uniquename = $entry[&#38;quot;5&#38;quot;];
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;in archive.php:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;h2 class=&#38;quot;title&#38;quot;&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php the_permalink();?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/h2&#38;gt;
		        &#38;lt;?php the_excerpt(); ?&#38;gt;
		        &#38;lt;div class=&#38;quot;meta&#38;quot;&#38;gt; &#38;lt;?php echo $uniquename; ?&#38;gt;&#38;lt;/div&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Any help much appreciated. Thanks.&#60;/p&#62;
&#60;p&#62;-AW
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
