<?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: Dynamically Populate List Field - Example Needed</title>
		<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-list-field-example-needed</link>
		<description>Gravity Support Forums Topic: Dynamically Populate List Field - Example Needed</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 06:32:43 +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/dynamically-populate-list-field-example-needed" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "Dynamically Populate List Field - Example Needed"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-list-field-example-needed#post-49329</link>
			<pubDate>Mon, 13 Feb 2012 18:35:09 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">49329@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You wouldn't use the pre_render hook in this situation. You would dynamically populate a list field using the gform_field_value_$parameter_name filter which is documented here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_field_value_$parameter_name&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_field_value_$parameter_name&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You would first need to set the field so that it can be populated dynamically and give it a parameter name.  You do this by editing the form and then editing your list field.  The dynamic population option is under the Advanced tab.&#60;/p&#62;
&#60;p&#62;The following is a sample snippet that will help you with the data format. This example assumes you used &#34;list&#34; as the parameter name for that field and that it is a multi-column list field.  You can customize it to suit your needs (single column, more columns, less columns, etc.).&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_field_value_list&#38;quot;, &#38;quot;populate_list&#38;quot;);
function populate_list($value){
   return array(&#38;quot;row 1 - col1&#38;quot;,&#38;quot;row 1 - col2&#38;quot;, &#38;quot;row 1 - col3&#38;quot;,
                &#38;quot;row 2 - col1&#38;quot;, &#38;quot;row 2 - col2&#38;quot;, &#38;quot;row 2 - col3&#38;quot;,
                &#38;quot;row 3 - col1&#38;quot;, &#38;quot;row 3 - col2&#38;quot;, &#38;quot;row 3 - col3&#38;quot;);

}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;There is also a How To page on how to dynamically populate fields using the same filter, although it doesn't use a List Field as an example.  You can find that How To here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Using_Dynamic_Population&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Using_Dynamic_Population&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>carcinomad on "Dynamically Populate List Field - Example Needed"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-populate-list-field-example-needed#post-49303</link>
			<pubDate>Mon, 13 Feb 2012 16:52:14 +0000</pubDate>
			<dc:creator>carcinomad</dc:creator>
			<guid isPermaLink="false">49303@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I just need a simple example how to dynamically populate the list field during a pre_render.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
