<?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: Add option to only run action when selected</title>
		<link>https://legacy.forums.gravityhelp.com/topic/add-option-to-only-run-action-when-selected</link>
		<description>Gravity Support Forums Topic: Add option to only run action when selected</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 01:25:06 +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/add-option-to-only-run-action-when-selected" rel="self" type="application/rss+xml" />

		<item>
			<title>Alex Cancado on "Add option to only run action when selected"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-option-to-only-run-action-when-selected#post-137562</link>
			<pubDate>Thu, 31 Jan 2013 12:49:31 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">137562@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You are very close. You need to change two things.&#60;br /&#62;
1- Change the SetFieldProperty() function call to:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;form[&#38;#39;sendHubSpot&#38;#39;] = this.checked;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;SetFieldProperty() is used for field properties and you need to set your property to the form object&#60;/p&#62;
&#60;p&#62;2- When loading your checkbox with the value, use the gform_load_form_settings instead of gform_load_field_settings. Following is an example:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;jQuery(document).bind(&#38;quot;gform_load_form_settings&#38;quot;, function(event, field, form){
jQuery(&#38;quot;#field_hubspot_setting&#38;quot;).attr(&#38;quot;checked&#38;quot;, form[&#38;quot;sendHubSpot&#38;quot;] == true);
});&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Then, yea, your property will be loaded in the $form object. So $form['sendHubSpot'] is the way to access it from the hooks.&#60;br /&#62;
I hope this helps.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ajmorris on "Add option to only run action when selected"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-option-to-only-run-action-when-selected#post-136636</link>
			<pubDate>Wed, 30 Jan 2013 15:41:03 +0000</pubDate>
			<dc:creator>ajmorris</dc:creator>
			<guid isPermaLink="false">136636@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Also, once I get it to do that, how to I check to see if that option is selected? Will it show up in the $form object? If so, I can check to see its in there and see if it's set to true/false?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ajmorris on "Add option to only run action when selected"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-option-to-only-run-action-when-selected#post-136635</link>
			<pubDate>Wed, 30 Jan 2013 15:39:52 +0000</pubDate>
			<dc:creator>ajmorris</dc:creator>
			<guid isPermaLink="false">136635@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Alright Chris, might just need a little bit more help getting this to work right. Here's what I've got to show the checkbox, &#60;a href=&#34;https://gist.github.com/4676079&#34; rel=&#34;nofollow&#34;&#62;https://gist.github.com/4676079&#60;/a&#62;. This works, but when I click it (so it's checked), save the form and come back to it, it's not showing that I selected the option. So I'm not sure how GF is saving that setting.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Add option to only run action when selected"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-option-to-only-run-action-when-selected#post-135815</link>
			<pubDate>Wed, 30 Jan 2013 01:06:25 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">135815@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;OK, let us know if you need any more help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ajmorris on "Add option to only run action when selected"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-option-to-only-run-action-when-selected#post-135515</link>
			<pubDate>Tue, 29 Jan 2013 18:05:45 +0000</pubDate>
			<dc:creator>ajmorris</dc:creator>
			<guid isPermaLink="false">135515@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey Chris, thanks for the reply! Short answer is yes. I want to be able to select which forms pass through the plugin, so having that be an option I can allow the user to select on a per form basis is what I'm looking for. What I'm going to do is reverse your thought. I'm going to set it up that if you want the form/entries to go to HubSpot, you'll need to click the check box. Either way, you just pointed me in the right direction! Thanks!! I'm sure I might have another question after I get this part working.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Add option to only run action when selected"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-option-to-only-run-action-when-selected#post-134649</link>
			<pubDate>Tue, 29 Jan 2013 00:52:42 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">134649@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;When you say &#34;everything working on the back end&#34; do you mean that everything is being sent fine to HubSpot right now?  The issue is, you want to give form builders the option to check a box and NOT have the submission go to HubSpot?&#60;/p&#62;
&#60;p&#62;It sounds like new forms are being created all the time, so using form IDs in your filter or action calls is probably not practical?&#60;/p&#62;
&#60;p&#62;How about using the gform_advanced_settings filter: &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_advanced_settings&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_advanced_settings&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ajmorris on "Add option to only run action when selected"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add-option-to-only-run-action-when-selected#post-134197</link>
			<pubDate>Mon, 28 Jan 2013 15:22:44 +0000</pubDate>
			<dc:creator>ajmorris</dc:creator>
			<guid isPermaLink="false">134197@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm having a difficult time trying to figure out where/how best to do this. I'm looking for a way that I can build a form, add a checkbox to the &#34;advanced&#34; tab (perhaps the best way?!?) that will allow me to look for an option so that I can run an action if this option is selected.&#60;/p&#62;
&#60;p&#62;The non-tech version of this is that I want to allow a user to select an option to send the form to HubSpot. I've got everything on the backend working, but the reality is that we have forms that aren't necessarily needing to be sent to HubSpot, so I'm trying to find a way that would make the best sense.&#60;/p&#62;
&#60;p&#62;I know there's an older plugin out there that already does this, but it's not using the new API. So I've been working on one. :) I'll release open-source if I can get this working the way I expect it to.&#60;/p&#62;
&#60;p&#62;If you have an easy example, that would be awesome! Thanks!!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
