<?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: Gform submit button Filter</title>
		<link>https://legacy.forums.gravityhelp.com/topic/gform-submit-button-filter</link>
		<description>Gravity Support Forums Topic: Gform submit button Filter</description>
		<language>en-US</language>
		<pubDate>Fri, 03 Apr 2026 22:36:47 +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/gform-submit-button-filter" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Gform submit button Filter"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-submit-button-filter#post-45665</link>
			<pubDate>Thu, 05 Jan 2012 21:29:40 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">45665@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Glad you got that working.  Thanks for the update.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>trewknowledge on "Gform submit button Filter"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-submit-button-filter#post-45607</link>
			<pubDate>Thu, 05 Jan 2012 13:36:33 +0000</pubDate>
			<dc:creator>trewknowledge</dc:creator>
			<guid isPermaLink="false">45607@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thats perfect! Thanks so much for the amazing help!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Gform submit button Filter"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-submit-button-filter#post-45508</link>
			<pubDate>Wed, 04 Jan 2012 19:21:13 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">45508@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Instead of this:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;[php]
gform_submit_button_1&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;use this:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;[php]
gform_submit_button&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And then in the code below do this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
if($form[&#38;#39;id&#38;#39;] == 1 &#124;&#124; $form[&#38;#39;id&#38;#39;] == 7 &#124;&#124; $form[&#38;#39;id&#38;#39;] == 5) {
// then return the custom button for forms 1, 5 or 7&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You can use whatever PHP conditional you are comfortable with (I used simple OR logic).   You could put the form IDs into an array and then check the array for the existence of the ID.&#60;/p&#62;
&#60;p&#62;It might look like this when you are done:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
// filter the Gravity Forms button type on Form ID 1
add_filter(&#38;quot;gform_submit_button&#38;quot;, &#38;quot;form_submit_button&#38;quot;, 10, 2);
function form_submit_button($button, $form) {
    if ($form[&#38;#39;id&#38;#39;] == 1 &#124;&#124; $form[&#38;#39;id&#38;#39;] == 7 &#124;&#124; $form[&#38;#39;id&#38;#39;] == 5) {
        return &#38;quot;&#38;lt;button class=&#38;#39;button&#38;#39; id=&#38;#39;gform_submit_button_{$form[&#38;quot;id&#38;quot;]}&#38;#39;&#38;gt;&#38;lt;span&#38;gt;Submit&#38;lt;/span&#38;gt;&#38;lt;/button&#38;gt;&#38;quot;;
    }
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>trewknowledge on "Gform submit button Filter"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-submit-button-filter#post-45432</link>
			<pubDate>Wed, 04 Jan 2012 12:18:09 +0000</pubDate>
			<dc:creator>trewknowledge</dc:creator>
			<guid isPermaLink="false">45432@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ahh yes that works.&#60;/p&#62;
&#60;p&#62;Is it possible to pass an array of form ID's? so if I wanted to change the submit button on lets say 3 different forms.&#60;/p&#62;
&#60;p&#62;I could obviously just run the same code 3 different times with different IDS, but perhaps there is a simpler way.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "Gform submit button Filter"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-submit-button-filter#post-45423</link>
			<pubDate>Wed, 04 Jan 2012 09:03:30 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">45423@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You would pass the form ID like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// filter the Gravity Forms button type on Form ID 1
add_filter(&#38;quot;gform_submit_button_1&#38;quot;, &#38;quot;form_submit_button&#38;quot;, 10, 2);
function form_submit_button($button, $form){
    return &#38;quot;&#38;lt;button class=&#38;#39;button&#38;#39; id=&#38;#39;gform_submit_button_{$form[&#38;quot;id&#38;quot;]}&#38;#39;&#38;gt;&#38;lt;span&#38;gt;Submit&#38;lt;/span&#38;gt;&#38;lt;/button&#38;gt;&#38;quot;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You can see the gform_submit_button_1 is the change.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>trewknowledge on "Gform submit button Filter"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-submit-button-filter#post-45410</link>
			<pubDate>Wed, 04 Jan 2012 01:12:34 +0000</pubDate>
			<dc:creator>trewknowledge</dc:creator>
			<guid isPermaLink="false">45410@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello, &#60;/p&#62;
&#60;p&#62;I have been able to change my GF submit button using  'add_filter(&#34;gform_submit_button&#34;, &#34;form_submit_button&#34;, 10, 2); '&#60;/p&#62;
&#60;p&#62;However it changes the submit button for all of my forms on the site, how would I go about only changing the submit button based on the forms id?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
