<?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: Limiting gform_field_choices by form parameter?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/limiting-gform_field_choices-by-form-parameter</link>
		<description>Gravity Support Forums Topic: Limiting gform_field_choices by form parameter?</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 17:34: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/limiting-gform_field_choices-by-form-parameter" rel="self" type="application/rss+xml" />

		<item>
			<title>Idealien on "Limiting gform_field_choices by form parameter?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limiting-gform_field_choices-by-form-parameter#post-77914</link>
			<pubDate>Fri, 28 Sep 2012 11:43:24 +0000</pubDate>
			<dc:creator>Idealien</dc:creator>
			<guid isPermaLink="false">77914@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Using the gform_field_css_class action I am able to ensure that the following logic only gets executed against a particular form by CSS class on the form. I'm distributing the form for others to import, so cannot use the form # since it changes per import / site.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_field_css_class&#38;quot;, &#38;quot;class_silent&#38;quot;), 10, 3);
function class_silent($classes, $field, $form){
		$auctionFormType = strpos($form[&#38;#39;cssClass&#38;#39;], &#38;#39;idealien_auctions&#38;#39;);
		if( $auctionFormType === false )
			return $classes;

		if($field[&#38;#39;inputName&#38;#39;] == &#38;quot;displayName&#38;quot;){
        	$classes .= &#38;quot; hidden &#38;quot;;
    	}
    return $classes;
	}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The parameters for gform_field_choices filter does not include $form to do the same logic. Is there another recommended approach to ensure the modification to choices does not occur outside of the intended form?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
