<?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: populate function give a white page. Why ?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/populate-function-give-a-white-page-why</link>
		<description>Gravity Support Forums Topic: populate function give a white page. Why ?</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 13:46:04 +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/populate-function-give-a-white-page-why" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "populate function give a white page. Why ?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-function-give-a-white-page-why#post-161908</link>
			<pubDate>Wed, 06 Mar 2013 08:45:19 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">161908@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;What error is logged when you get the white screen?  A 500 Internal Server Error should be logged.  We will need to know what the error is to be able to help you resolve it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Laurent CUCHET on "populate function give a white page. Why ?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-function-give-a-white-page-why#post-160638</link>
			<pubDate>Tue, 05 Mar 2013 05:26:30 +0000</pubDate>
			<dc:creator>Laurent CUCHET</dc:creator>
			<guid isPermaLink="false">160638@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;All in question, and the code here come from Gravity. Any idea why I get errors ?&#60;/p&#62;
&#60;p&#62;Code paste in functions.php :&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;// populate the field with &#38;quot;user_firstname&#38;quot; as the population parameter with the &#38;quot;first_name&#38;quot; of the current user
add_filter(&#38;#39;gform_field_value_user_firstname&#38;#39;, create_function(&#38;quot;&#38;quot;, &#38;#39;$value = populate_usermeta(\&#38;#39;first_name\&#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;last_name\&#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; ));

// 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);
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
