<?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_filter not working after update to 1.6.2</title>
		<link>https://legacy.forums.gravityhelp.com/topic/add_filter-not-working-after-update-to-162</link>
		<description>Gravity Support Forums Topic: Add_filter not working after update to 1.6.2</description>
		<language>en-US</language>
		<pubDate>Mon, 13 Apr 2026 01:54:45 +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_filter-not-working-after-update-to-162" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Add_filter not working after update to 1.6.2"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add_filter-not-working-after-update-to-162#post-45103</link>
			<pubDate>Wed, 28 Dec 2011 18:57:22 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">45103@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is this accurate or a typo?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
#value = $_POST[&#38;#39;input_9&#38;#39;];&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Should it be?&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;[php]
$value = $_POST[&#38;#39;input_9&#38;#39;];&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Add_filter not working after update to 1.6.2"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add_filter-not-working-after-update-to-162#post-45035</link>
			<pubDate>Tue, 27 Dec 2011 21:57:39 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">45035@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Carl,&#60;/p&#62;
&#60;p&#62;We didn't change anything with the validation code, the only change was updating to the latest GF (that's when it broke). This is an important customer so we would appreciate getting some help resolving this issue. The PHP validation code has always worked in the past, we need to figure out what changed between this version of GF and the last in order to identify the issue and resolve it.&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Add_filter not working after update to 1.6.2"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add_filter-not-working-after-update-to-162#post-45026</link>
			<pubDate>Tue, 27 Dec 2011 20:55:31 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">45026@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;There are no known issues with using the gform_validation hook and Gravity Forms v1.6.2.  It's extensively used by things such as our own Add-Ons, etc.  So if implemented properly it should work.&#60;/p&#62;
&#60;p&#62;What I would suggest is review your code, make sure everything matches up with what you are trying to do (field id's, etc.) and do a code review and then do some more tests to see if it's something unrelated.&#60;/p&#62;
&#60;p&#62;If after doing so you are unable to figure out what could be wrong, let us know and we can dig deeper and assist you.  Just keep in mind that this is a customization so non-customization related support requests take priority over customization related code issues.  But we'd be glad to take a look if after doing the above you are unable to determine why it is not working.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Add_filter not working after update to 1.6.2"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/add_filter-not-working-after-update-to-162#post-45012</link>
			<pubDate>Tue, 27 Dec 2011 18:56:56 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">45012@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello, We had an &#34;add_filter&#34; set up for validation that used to work before upgrading to the latest version. We can not figure out why it isnt working now. Could you please help us figure out why? I have copied and pasted the code below.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;[php]
//code

add_filter(&#38;#39;gform_validation&#38;#39;, &#38;#39;custom_validation&#38;#39;);

function custom_validation($validation_result){

#value = $_POST[&#38;#39;input_9&#38;#39;];

$em=$value;

$ar=split(&#38;quot;@&#38;quot;,$em);

$domain = explode(&#38;quot;@&#38;quot;, $value);

$domain = $domain[(count($domain)-1)];

$blacklist = array(&#38;#39;yahoo-inc.com&#38;#39;);

if (in_array($domain, $blacklist)) {

echo $ar[1];

// set the form validation to false

$validation_result[&#38;quot;is_valid&#38;quot;] = false;

//finding Field with ID of 1 and marking it as failed validation

foreach($validation_result[&#38;quot;form&#38;quot;][&#38;quot;fields&#38;quot;] as &#38;amp;$field){

//NOTE: replace 1 with the field you would like to validate

if($field[&#38;quot;id&#38;quot;] == &#38;quot;9&#38;quot;){

$field[&#38;quot;failed_validation&#38;quot;] = true;

$field[&#38;quot;validation_message&#38;quot;] = &#38;quot;Only commercial (non-free) Email accounts are accepted.&#38;quot;;

break;

}
}
}
return $validation_result;
}

// END CODE&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
