<?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: add filter for first name, last name</title>
		<link>https://legacy.forums.gravityhelp.com/topic/add-filter-for-first-name-last-name</link>
		<description>Gravity Support Forums Topic: add filter for first name, last name</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 03:04:44 +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/add-filter-for-first-name-last-name" rel="self" type="application/rss+xml" />

		<item>
			<title>john_1 on "add filter for first name, last name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-filter-for-first-name-last-name#post-110973</link>
			<pubDate>Sun, 30 Dec 2012 07:41:22 +0000</pubDate>
			<dc:creator>john_1</dc:creator>
			<guid isPermaLink="false">110973@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi again,&#60;/p&#62;
&#60;p&#62;Have you found any solutions that could help me with this issue?&#60;/p&#62;
&#60;p&#62;Happy new year,&#60;/p&#62;
&#60;p&#62;John
&#60;/p&#62;</description>
		</item>
		<item>
			<title>john_1 on "add filter for first name, last name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-filter-for-first-name-last-name#post-100315</link>
			<pubDate>Sat, 08 Dec 2012 08:42:32 +0000</pubDate>
			<dc:creator>john_1</dc:creator>
			<guid isPermaLink="false">100315@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Any news on this topic?&#60;/p&#62;
&#60;p&#62;Thank you.&#60;/p&#62;
&#60;p&#62;Regards&#60;br /&#62;
John
&#60;/p&#62;</description>
		</item>
		<item>
			<title>john_1 on "add filter for first name, last name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-filter-for-first-name-last-name#post-98392</link>
			<pubDate>Mon, 03 Dec 2012 14:21:41 +0000</pubDate>
			<dc:creator>john_1</dc:creator>
			<guid isPermaLink="false">98392@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi again,&#60;/p&#62;
&#60;p&#62;I´m using the complex name field. Non of them are working, nor does email.&#60;/p&#62;
&#60;p&#62;/John
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "add filter for first name, last name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-filter-for-first-name-last-name#post-96611</link>
			<pubDate>Wed, 28 Nov 2012 13:59:17 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">96611@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Just ignoring pre-render functions, and focusing on the merge tags, do none of them work? Are you using separate input fields for First name and last name, or are you using the complex name field? Did e-mail work? Let me know.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>john_1 on "add filter for first name, last name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-filter-for-first-name-last-name#post-96575</link>
			<pubDate>Wed, 28 Nov 2012 12:08:47 +0000</pubDate>
			<dc:creator>john_1</dc:creator>
			<guid isPermaLink="false">96575@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;David,&#60;/p&#62;
&#60;p&#62;Thank you for your fast reply.&#60;/p&#62;
&#60;p&#62;Well, I dont know how to explain everything easy.&#60;br /&#62;
I want to get pre-filled form entries. In this case First name, Lastname and email.&#60;/p&#62;
&#60;p&#62;I have created a form with these entries and now want them to be filled in automatically depending on logged in user.&#60;br /&#62;
So, I´ve gone thru all the forums trying to edit the functions.php with &#34;add_filter&#34; etc., since that is what they are telling me to do to populate the fields. Nothing works.&#60;/p&#62;
&#60;p&#62;I then came across this page with your much simpler way of doing this, by merge tags. So, I have used the tags stated on this page, &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Merge_Tags&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Merge_Tags&#60;/a&#62;, in the field for each form entry under tab advanced/dynamic inputs.&#60;/p&#62;
&#60;p&#62;Example:&#60;br /&#62;
In the settings for the entry First name, I have put the tag {user:first_name}. But it doesn't work. When I bring up the form in front end the form is empty (When First name should be pre-filled with my name).&#60;/p&#62;
&#60;p&#62;I have tried to alter the tag in any way possible, without result.&#60;/p&#62;
&#60;p&#62;Any advice?&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
John
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "add filter for first name, last name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-filter-for-first-name-last-name#post-96564</link>
			<pubDate>Wed, 28 Nov 2012 11:41:57 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">96564@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi John_1, you didn't give us much to go on. Can you explain what you are doing, and give us a step by step of what you've tried and what isn't working so we can give you some assistance?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>john_1 on "add filter for first name, last name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-filter-for-first-name-last-name#post-96534</link>
			<pubDate>Wed, 28 Nov 2012 10:28:42 +0000</pubDate>
			<dc:creator>john_1</dc:creator>
			<guid isPermaLink="false">96534@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I´m really trying to use the merge tags. It just doesn't work.&#60;br /&#62;
I´m not sure what i´m doing wrong but have tried all kinds of different tags under &#34;Parameter Name&#34; for dynamical content.&#60;/p&#62;
&#60;p&#62;I also have read alot about adding filters to function.php etc., but this doesn't work either. &#60;/p&#62;
&#60;p&#62;I´d appreciate some help.&#60;/p&#62;
&#60;p&#62;Thanks in advance.&#60;/p&#62;
&#60;p&#62;/John
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "add filter for first name, last name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-filter-for-first-name-last-name#post-80948</link>
			<pubDate>Sun, 14 Oct 2012 22:16:57 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">80948@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm not sure about this code, but I am wondering why you cannot use the built in merge tags for the default value for these user meta values, no code required.  &#60;/p&#62;
&#60;p&#62;Documentation: &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Merge_Tags&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Merge_Tags&#60;/a&#62;&#60;br /&#62;
( find &#60;strong&#62;{user:[meta_key]}&#60;/strong&#62; )&#60;/p&#62;
&#60;p&#62;Maybe there is something unique about your situation which requires this code?  It seems more complex than it needs to be.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>eddierosenthal on "add filter for first name, last name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-filter-for-first-name-last-name#post-80659</link>
			<pubDate>Fri, 12 Oct 2012 18:00:06 +0000</pubDate>
			<dc:creator>eddierosenthal</dc:creator>
			<guid isPermaLink="false">80659@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;i have a form that takes first name, last name, email and date.&#60;br /&#62;
i am able to pre populate email and date ok, but not the first name or last name.&#60;br /&#62;
can you see what is wrong with the code?&#60;br /&#62;
the fields have been set to allow for  dynamic updating - with first name parameter&#60;br /&#62;
&#34;firstname&#34; and last name parameter  &#34;lastname&#34;&#60;br /&#62;
changes were made in the theme's function.php file.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_field_value_user_firstname&#38;#39;, create_function(&#38;quot;&#38;quot;, &#38;#39;$value = populate_usermeta(\&#38;#39;firstname\&#38;#39;); return $value;&#38;#39; ));

// populate the field with &#38;quot;user_lastname&#38;quot; as the population parameter with the &#38;quot;last_name&#38;quot; of the current user
add_filter(&#38;#39;gform_field_value_user_lastname&#38;#39;, create_function(&#38;quot;&#38;quot;, &#38;#39;$value = populate_usermeta(\&#38;#39;lastname\&#38;#39;); return $value;&#38;#39; ));
// populate the field with &#38;quot;user_email&#38;quot; as the population parameter with the &#38;quot;email&#38;quot; of the current user
add_filter(&#38;#39;gform_field_value_user_email&#38;#39;, create_function(&#38;quot;&#38;quot;, &#38;#39;$value = populate_usermeta(\&#38;#39;user_email\&#38;#39;); return $value;&#38;#39; ));

add_filter(&#38;quot;gform_field_value_today&#38;quot;, &#38;quot;populate_today&#38;quot;);

// this function is called by both filters and returns the requested user meta of the current user
function populate_usermeta($meta_key){
    global $current_user;
    return $current_user-&#38;gt;__get($meta_key);
}

function populate_today(){
	$format = &#38;quot;m\/d\/Y&#38;quot;;
	$today_value = date($format);
	return 	$today_value;
	}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
