<?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: Multi page forms with dynamic population</title>
		<link>https://legacy.forums.gravityhelp.com/topic/multi-page-forms-with-dynamic-population</link>
		<description>Gravity Support Forums Topic: Multi page forms with dynamic population</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 02:55:20 +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/multi-page-forms-with-dynamic-population" rel="self" type="application/rss+xml" />

		<item>
			<title>David Smith on "Multi page forms with dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/multi-page-forms-with-dynamic-population#post-31878</link>
			<pubDate>Fri, 05 Aug 2011 16:31:00 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">31878@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;My pleasure. :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>wrighty505 on "Multi page forms with dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/multi-page-forms-with-dynamic-population#post-31875</link>
			<pubDate>Fri, 05 Aug 2011 16:09:22 +0000</pubDate>
			<dc:creator>wrighty505</dc:creator>
			<guid isPermaLink="false">31875@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yep that sorted it David :-)&#60;/p&#62;
&#60;p&#62;Many thanks for you help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Multi page forms with dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/multi-page-forms-with-dynamic-population#post-31873</link>
			<pubDate>Fri, 05 Aug 2011 16:05:44 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">31873@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Steve,&#60;/p&#62;
&#60;p&#62;Apologies for the hasty code. It should be rgpost(). No underscore. Let me know how it works. Also, make sure you are using the latest version of Gravity Forms as this function was added in a fairly recent version.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>wrighty505 on "Multi page forms with dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/multi-page-forms-with-dynamic-population#post-31872</link>
			<pubDate>Fri, 05 Aug 2011 16:03:24 +0000</pubDate>
			<dc:creator>wrighty505</dc:creator>
			<guid isPermaLink="false">31872@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi David &#60;/p&#62;
&#60;p&#62;Many thanks for the quick reply. I have tried your suggestion above but get a PHP error:&#60;/p&#62;
&#60;p&#62;Fatal error: Call to undefined function rg_post() in....&#60;/p&#62;
&#60;p&#62;So it look like that function is not available! For your info here is the revised code that I am using: &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter( &#38;#39;gform_pre_render_13&#38;#39;, &#38;#39;populate_dropdown&#38;#39; );

function populate_dropdown($form){

    // localise form values
    $d1 = rg_post(&#38;#39;input_4&#38;#39;);
    $d2 = rg_post(&#38;#39;input_5&#38;#39;);
    $d3 = rg_post(&#38;#39;input_6&#38;#39;);

    // creating drop down item array.
    $items = array();

    // adding initial empty value
    $items[] = array(&#38;quot;text&#38;quot; =&#38;gt; &#38;quot;Please Select…&#38;quot;, &#38;quot;value&#38;quot; =&#38;gt; &#38;quot;&#38;quot;);

    // build array of values from text fields on first page of multipage form
    $items[] = array(&#38;quot;text&#38;quot; =&#38;gt; $d1, &#38;quot;value&#38;quot; =&#38;gt; $d1);
    $items[] = array(&#38;quot;text&#38;quot; =&#38;gt; $d2, &#38;quot;value&#38;quot; =&#38;gt; $d2);
    $items[] = array(&#38;quot;text&#38;quot; =&#38;gt; $d3, &#38;quot;value&#38;quot; =&#38;gt; $d3);

    // loop over fields and populate dynamic values into dropdown field 6
    foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field)
        if($field[&#38;quot;id&#38;quot;] == 6){
            $field[&#38;quot;type&#38;quot;] = &#38;quot;select&#38;quot;;
            $field[&#38;quot;choices&#38;quot;] = $items;
        }
    return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Let me know what you think maybe there is something I need to add. &#60;/p&#62;
&#60;p&#62;Thanks for your help.&#60;/p&#62;
&#60;p&#62;Steve
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Multi page forms with dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/multi-page-forms-with-dynamic-population#post-31863</link>
			<pubDate>Fri, 05 Aug 2011 15:35:03 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">31863@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Steve,&#60;/p&#62;
&#60;p&#62;The &#60;strong&#62;$entry&#60;/strong&#62; is not available during the &#60;strong&#62;gform_pre_render&#60;/strong&#62; hook. To retrieve submitted values on a multi-page form during the pre render process, you'll want to use the &#60;strong&#62;rg_post()&#60;/strong&#62; function.&#60;/p&#62;
&#60;p&#62;Example:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;[php]
$value = rg_post(&#38;#39;input_4&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>wrighty505 on "Multi page forms with dynamic population"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/multi-page-forms-with-dynamic-population#post-31810</link>
			<pubDate>Fri, 05 Aug 2011 08:42:54 +0000</pubDate>
			<dc:creator>wrighty505</dc:creator>
			<guid isPermaLink="false">31810@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have read through the forum posts and docs prior to this support request. Here is a quick summary of that I am trying to do.&#60;/p&#62;
&#60;p&#62;I have a multipage form. On the first page are 3 text input boxes for the user to enter names. On the second page I want to populate a drop down field with the three values. Here is the code I am using in my hook:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter( &#38;#39;gform_pre_render_13&#38;#39;, &#38;#39;populate_dropdown&#38;#39; );

function populate_dropdown($form){
    // creating drop down item array.
    $items = array();

    // adding initial empty value
    $items[] = array(&#38;quot;text&#38;quot; =&#38;gt; &#38;quot;Please Select…&#38;quot;, &#38;quot;value&#38;quot; =&#38;gt; &#38;quot;&#38;quot;);

    // build array of values from text fields on first page of multipage form
    $items[] = array(&#38;quot;text&#38;quot; =&#38;gt; $entry[&#38;#39;4&#38;#39;], &#38;quot;value&#38;quot; =&#38;gt; $entry[&#38;#39;4&#38;#39;]);
    $items[] = array(&#38;quot;text&#38;quot; =&#38;gt; $entry[&#38;#39;5&#38;#39;], &#38;quot;value&#38;quot; =&#38;gt; $entry[&#38;#39;5&#38;#39;]);
    $items[] = array(&#38;quot;text&#38;quot; =&#38;gt; $entry[&#38;#39;6&#38;#39;], &#38;quot;value&#38;quot; =&#38;gt; $entry[&#38;#39;6&#38;#39;]);

    // loop over fields and populate dynamic values into dropdown field 6
    foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field)
        if($field[&#38;quot;id&#38;quot;] == 6){
            $field[&#38;quot;type&#38;quot;] = &#38;quot;select&#38;quot;;
            $field[&#38;quot;choices&#38;quot;] = $items;
        }
    return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The issue I have is that I don't get the $entry['x'] they are all blank. From reading the docs I assume I would need to use the gform_post_submission filter to get the $entry values. &#60;/p&#62;
&#60;p&#62;Could you confirm if the post_submission filter is fired when the user goes from page 1 to page 2 and if so how I would use the post_submission and pre_render filters together.&#60;/p&#62;
&#60;p&#62;Hopefully this is not a completely stupid question.&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
Steve
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
