<?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: Problem with gform_pre_render and a custom field type</title>
		<link>https://legacy.forums.gravityhelp.com/topic/problem-with-gform_pre_render-and-a-custom-field-type</link>
		<description>Gravity Support Forums Topic: Problem with gform_pre_render and a custom field type</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 20:04:42 +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/problem-with-gform_pre_render-and-a-custom-field-type" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Problem with gform_pre_render and a custom field type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/problem-with-gform_pre_render-and-a-custom-field-type#post-191949</link>
			<pubDate>Sun, 31 Mar 2013 18:28:02 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">191949@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Have you tried to contact that plugin's author for their advice on adding a default value to the field?  I'm not familiar with that plugin at all to know the correct way to do it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>passatgt on "Problem with gform_pre_render and a custom field type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/problem-with-gform_pre_render-and-a-custom-field-type#post-187974</link>
			<pubDate>Thu, 28 Mar 2013 12:23:01 +0000</pubDate>
			<dc:creator>passatgt</dc:creator>
			<guid isPermaLink="false">187974@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Well, not exactly i created it, but its definitely a custom made field, thats what i tried to explain somehow:) You can find it here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://plugins.trac.wordpress.org/browser/gravity-forms-wysiwyg/trunk/gf_wysiwyg_class.php&#34; rel=&#34;nofollow&#34;&#62;http://plugins.trac.wordpress.org/browser/gravity-forms-wysiwyg/trunk/gf_wysiwyg_class.php&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;By default, it doesn't support the defaultValue option, so i changed the code in line 124 from this:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;wp_editor(&#38;#39;&#38;#39;, $input_id, $args);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;To this:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;wp_editor($field[&#38;quot;defaultValue&#38;quot;], $input_id, $args);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Problem with gform_pre_render and a custom field type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/problem-with-gform_pre_render-and-a-custom-field-type#post-187962</link>
			<pubDate>Thu, 28 Mar 2013 12:14:38 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">187962@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you share the code you used to create your custom field?  Please share all the custom code you are using.  Use pastebin.com or pastie.org please for lengthy code.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>passatgt on "Problem with gform_pre_render and a custom field type"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/problem-with-gform_pre_render-and-a-custom-field-type#post-186737</link>
			<pubDate>Wed, 27 Mar 2013 12:57:06 +0000</pubDate>
			<dc:creator>passatgt</dc:creator>
			<guid isPermaLink="false">186737@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi!&#60;/p&#62;
&#60;p&#62;I created a custom field type and i try to change the defaultValue by using the gform_pre_render, but somehow its not working.&#60;/p&#62;
&#60;p&#62;Here is the gform_pre_render function:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_render&#38;quot;, &#38;quot;populate_field&#38;quot;);
				function populate_field($form){
					$postID = $_GET[&#38;#39;id&#38;#39;];
				    if($form[&#38;quot;id&#38;quot;] != 5)
				       return $form;

				    foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field) {
				        if($field[&#38;quot;id&#38;quot;] == 34){
				            $field[&#38;quot;defaultValue&#38;quot;] = &#38;#39;just a test default value&#38;#39;;
				        }
				    }
				    return $form;
				}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;So as you can see, nothing special, however, its not working. If i set the default value in the admin panel, its working fine, but i can't change it like this. I also tried to change the description, and surprisingly that is working fine.&#60;/p&#62;
&#60;p&#62;Any idea? Thanks
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
