<?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: Echo Current Page Number</title>
		<link>https://legacy.forums.gravityhelp.com/topic/echo-current-page-number</link>
		<description>Gravity Support Forums Topic: Echo Current Page Number</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 02:33:09 +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/echo-current-page-number" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Echo Current Page Number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/echo-current-page-number#post-160463</link>
			<pubDate>Tue, 05 Mar 2013 00:24:39 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">160463@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Glad you were able to figure that out.  Thank you for the update.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>nuimagemedical on "Echo Current Page Number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/echo-current-page-number#post-158023</link>
			<pubDate>Fri, 01 Mar 2013 17:27:58 +0000</pubDate>
			<dc:creator>nuimagemedical</dc:creator>
			<guid isPermaLink="false">158023@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I figured it out.&#60;/p&#62;
&#60;p&#62;Placing the following code in functions.php or before the wp_head() function in header.php will work:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function run_script_on_last_page($form) {
    if (!is_admin()) {
        $current_page = rgpost(&#38;#39;gform_source_page_number_&#38;#39; . $form[&#38;#39;id&#38;#39;]) ? rgpost(&#38;#39;gform_source_page_number_&#38;#39; . $form[&#38;#39;id&#38;#39;]) : 1;
        if ($current_page == 9) {  //my last page
            wp_enqueue_script(&#38;#39;custom_script&#38;#39;, get_template_directory_uri() . &#38;#39;/js/custom_script.js&#38;#39;, array(&#38;#39;jquery&#38;#39;), null, true);
        }
    }
}
add_action(&#38;#39;gform_enqueue_scripts_63&#38;#39;, &#38;#39;run_script_on_last_page&#38;#39;); //form ID is 63&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Thanks Gravity Forms Support Forums!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>nuimagemedical on "Echo Current Page Number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/echo-current-page-number#post-157083</link>
			<pubDate>Thu, 28 Feb 2013 17:09:23 +0000</pubDate>
			<dc:creator>nuimagemedical</dc:creator>
			<guid isPermaLink="false">157083@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have a multi-page form.&#60;/p&#62;
&#60;p&#62;I would like to execute some custom JavaScript on a specific page.&#60;/p&#62;
&#60;p&#62;I understand that I can retrieve the current page number by &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_validation%22_Hook#Getting_the_Current_Page&#34; rel=&#34;nofollow&#34;&#62;following these instructions&#60;/a&#62;, however, I'm not sure how I can retrieve the value of the $current_page variable and echo it to the DOM so that I can check for it and execute my JavaScript.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
