<?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: Custom Field in Form</title>
		<link>https://legacy.forums.gravityhelp.com/topic/custom-field-in-form</link>
		<description>Gravity Support Forums Topic: Custom Field in Form</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 02:56:00 +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/custom-field-in-form" rel="self" type="application/rss+xml" />

		<item>
			<title>jonnyrap on "Custom Field in Form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-in-form#post-6149</link>
			<pubDate>Mon, 07 Jun 2010 04:02:34 +0000</pubDate>
			<dc:creator>jonnyrap</dc:creator>
			<guid isPermaLink="false">6149@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Alex, sent you an email, thankyou very much for the help
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Custom Field in Form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-in-form#post-6147</link>
			<pubDate>Sun, 06 Jun 2010 21:51:15 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">6147@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The code looks good.&#60;br /&#62;
Have you enabled your ref field to be populated dynamically in the field editor (advanced tab) and gave it the name &#34;ref&#34;?&#60;br /&#62;
If so, I will need to take a closer look at it. Drop me a line at alex[at]rocketgenius.com with a WP admin login and I will see what is going on.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jonnyrap on "Custom Field in Form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-in-form#post-6106</link>
			<pubDate>Sat, 05 Jun 2010 11:36:57 +0000</pubDate>
			<dc:creator>jonnyrap</dc:creator>
			<guid isPermaLink="false">6106@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, put the code into the functions file but its not putting anything into the ref field, the form all works and sends but with the property ref field blank.&#60;/p&#62;
&#60;p&#62;I used:&#60;/p&#62;
&#60;p&#62;add_filter(&#34;gform_field_value_ref&#34;, &#34;populate_ref&#34;);&#60;br /&#62;
function populate_ref($value){&#60;br /&#62;
    global $post;&#60;/p&#62;
&#60;p&#62;    //replace &#34;custom_field_name&#34; with your action name&#60;br /&#62;
    return get_post_meta($post-&#38;gt;ID, &#34;ref&#34;, true);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;That correct? Any idea what I´m doing wrong?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jonnyrap on "Custom Field in Form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-in-form#post-6105</link>
			<pubDate>Sat, 05 Jun 2010 11:11:12 +0000</pubDate>
			<dc:creator>jonnyrap</dc:creator>
			<guid isPermaLink="false">6105@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Cheers, will try it out and let you know how I get on
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Custom Field in Form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-in-form#post-6092</link>
			<pubDate>Fri, 04 Jun 2010 17:00:48 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">6092@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Try the following. It should do the trick.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_field_value_ref&#38;quot;, &#38;quot;populate_ref&#38;quot;);
function populate_ref($value){
    global $post;

    //replace &#38;quot;custom_field_name&#38;quot; with your action name
    return get_post_meta($post-&#38;gt;ID, &#38;quot;custom_field_name&#38;quot;, true);
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>jonnyrap on "Custom Field in Form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-in-form#post-6082</link>
			<pubDate>Fri, 04 Jun 2010 11:34:37 +0000</pubDate>
			<dc:creator>jonnyrap</dc:creator>
			<guid isPermaLink="false">6082@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, sorry if this has been covered, have spent few hours looking through the forums but don't seem to be any the wiser.&#60;/p&#62;
&#60;p&#62;Am trying to get the form to insert a reference number from a custom field in the post into the form custom field. &#60;/p&#62;
&#60;p&#62;Might be easier to explain if I show what I'm trying to do, on each post page have set up custom fields for, property reference, bedrooms, bathrooms etc...&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.baxterestates.net/?p=67&#34; rel=&#34;nofollow&#34;&#62;http://www.baxterestates.net/?p=67&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;All I would like to do is have the property reference number load into a field in the form so that when the form is received they can see what the property is that the form relates to. Have got it working where it sends the page id/title but the client really wants the reference number in the email so it can all match up with their records.&#60;/p&#62;
&#60;p&#62;The custom field name in the post is called ref &#60;/p&#62;
&#60;p&#62;Does anyone know how I can do this, have tried:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_field_value_ref&#38;quot;, &#38;quot;populate_ref&#38;quot;);
function populate_ref(){
$ref_value = &#38;quot;Test&#38;quot;;
return $ref_value;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;which does send the value 'Test' in the form, but when I tried using:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_field_value_ref&#38;quot;, &#38;quot;populate_ref&#38;quot;);
function populate_ref(){
return ref(&#38;quot;ref&#38;quot;);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;It seems to hide everything below the existing custom fields in the post.&#60;/p&#62;
&#60;p&#62;If anyone can help me with this would be very appreciated!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
