<?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: Get Account Name</title>
		<link>https://legacy.forums.gravityhelp.com/topic/support-question</link>
		<description>Gravity Support Forums Topic: Get Account Name</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 00:57:26 +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/support-question" rel="self" type="application/rss+xml" />

		<item>
			<title>David Peralty on "Get Account Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/support-question#post-56672</link>
			<pubDate>Thu, 26 Apr 2012 14:29:02 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">56672@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;So the conclusion for anyone else that reads this is the following:&#60;/p&#62;
&#60;p&#62;Make sure your field ID matches what is in the form. In this case it needed to be changed to 10.&#60;br /&#62;
Then in the properties of the field, click Advanced and put a check mark in the Allow Field to be Populated Dynamically.&#60;br /&#62;
Lastly, make sure the Parameter name matches what you've put in the functions file. For this situation, it needed to be StudentID.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "Get Account Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/support-question#post-56669</link>
			<pubDate>Thu, 26 Apr 2012 13:53:45 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">56669@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Jon, can you send me a WP Admin login, FTP access and reference this post: &#60;a href=&#34;mailto:rob@rocketgenius.com&#34;&#62;rob@rocketgenius.com&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jon Marius on "Get Account Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/support-question#post-56668</link>
			<pubDate>Thu, 26 Apr 2012 13:33:15 +0000</pubDate>
			<dc:creator>Jon Marius</dc:creator>
			<guid isPermaLink="false">56668@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I don't know if I'm not supposed to post code on here, so if that's the case, feel free to delete it.. but this is what I have &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_field_value_StudentID&#38;quot;, &#38;quot;get_unique&#38;quot;);

function get_unique(){

    $prefix = &#38;quot;FP&#38;quot;; // update the prefix here

    do {
        $unique = mt_rand();
        $unique = substr($unique, 0, 6);
        $unique = $prefix . $unique;
    } while (!check_unique($unique));

    return $unique;
}

function check_unique($unique) {
    global $wpdb;

    $table = $wpdb-&#38;gt;prefix . &#38;#39;rg_lead_detail&#38;#39;;
    $form_id = 4; // update to the form ID your unique id field belongs to
    $field_id = 2; // update to the field ID your unique id is being prepopulated in
    $result = $wpdb-&#38;gt;get_var(&#38;quot;SELECT value FROM $table WHERE form_id = &#38;#39;$form_id&#38;#39; AND field_number = &#38;#39;$field_id&#38;#39; AND value = &#38;#39;$unique&#38;#39;&#38;quot;);

    if(empty($result))
        return true;

    return false;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;So then I added that field id to my emails.. So far, nothing has happened, I don't see a number generated in the reports or emails.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "Get Account Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/support-question#post-56664</link>
			<pubDate>Thu, 26 Apr 2012 12:47:45 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">56664@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Did you update: add_filter(&#34;gform_field_value_uuid&#34;, &#34;get_unique&#34;);&#60;/p&#62;
&#60;p&#62;to be: add_filter(&#34;gform_field_value_StudentID&#34;, &#34;get_unique&#34;);
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jon Marius on "Get Account Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/support-question#post-56663</link>
			<pubDate>Thu, 26 Apr 2012 12:30:12 +0000</pubDate>
			<dc:creator>Jon Marius</dc:creator>
			<guid isPermaLink="false">56663@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;OK I copied that code ti my theme_functions.php file, then replaced the form ID and the field ID, updated file, then added a hidden field in my form and named it StudentID, but I'm stuck.. Is that all I have to do to generate the random number?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "Get Account Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/support-question#post-56662</link>
			<pubDate>Thu, 26 Apr 2012 11:59:47 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">56662@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sorry about that, pastie.org is down at the moment, hopefully it will be back up soon. However, I've used this one before so I had the code snippet:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastebin.com/Fye6Xjd5&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/Fye6Xjd5&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jon Marius on "Get Account Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/support-question#post-56659</link>
			<pubDate>Thu, 26 Apr 2012 11:47:43 +0000</pubDate>
			<dc:creator>Jon Marius</dc:creator>
			<guid isPermaLink="false">56659@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;First off, thanks again for the outstanding support...&#60;/p&#62;
&#60;p&#62;I read both of your topic suggestions and I am more confused now. I guess I was getting it by the last topic (&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/guid-entry-id&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/guid-entry-id&#60;/a&#62;) but the link with the solution david smith posted is not coming up, so I am just wondering what the actual code I need to modify would be.&#60;/p&#62;
&#60;p&#62;I just want a generated number, could be random or consecutive, doesn't matter.&#60;br /&#62;
6 digits long, doesn't matter if it is only numeric or alpha numeric.&#60;br /&#62;
I want the number to be linked to the person's name (for reporting purposes)&#60;br /&#62;
and I want the number to be emailed to the person and to me&#60;/p&#62;
&#60;p&#62;thoughts?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "Get Account Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/support-question#post-56625</link>
			<pubDate>Thu, 26 Apr 2012 09:31:17 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">56625@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Here are some helpful links on that as well:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/random-number#post-52247&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/random-number#post-52247&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/guid-entry-id&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/guid-entry-id&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Get Account Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/support-question#post-56624</link>
			<pubDate>Thu, 26 Apr 2012 09:23:44 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">56624@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You could, but this feature is not built in and would require customization. &#60;/p&#62;
&#60;p&#62;If you wanted to do it, I would recommend using the following hook:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_confirmation&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_confirmation&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;To create a custom confirmation message that includes the registration number. &#60;/p&#62;
&#60;p&#62;If you wanted to save that confirmation number to your database, then you'll have to create a hidden field, populate that hidden field with your confirmation number and then in the confirmation, grab that value and display it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jon Marius on "Get Account Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/support-question#post-56619</link>
			<pubDate>Thu, 26 Apr 2012 09:05:17 +0000</pubDate>
			<dc:creator>Jon Marius</dc:creator>
			<guid isPermaLink="false">56619@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sure, I will let you know... I was wondering.. I doubt this is possible, but when a person adds the emails and send the message, would it be possible (in a perfect world it would lol) to generate a &#34;registration&#34; number of some sort?&#60;/p&#62;
&#60;p&#62;Not holding my breath on this one, but thought I'd ask.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
