<?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: How to check a field for a specific word using gform validation?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/how-to-check-a-field-for-a-specific-word-using-gform-validation</link>
		<description>Gravity Support Forums Topic: How to check a field for a specific word using gform validation?</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 03:27:02 +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/how-to-check-a-field-for-a-specific-word-using-gform-validation" rel="self" type="application/rss+xml" />

		<item>
			<title>demo38 on "How to check a field for a specific word using gform validation?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-check-a-field-for-a-specific-word-using-gform-validation#post-56147</link>
			<pubDate>Sun, 22 Apr 2012 23:34:09 +0000</pubDate>
			<dc:creator>demo38</dc:creator>
			<guid isPermaLink="false">56147@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;petitshoo, I haven't messed with this myself yet, and I'm no PHP expert, but you might want to try something like:&#60;/p&#62;
&#60;p&#62;if($result[&#34;is_valid&#34;] &#38;amp;&#38;amp; $a == &#34;hello&#34;){&#60;/p&#62;
&#60;p&#62;hello, being your term you're comparing the variable to. Hope this works for you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>petitshoo on "How to check a field for a specific word using gform validation?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-check-a-field-for-a-specific-word-using-gform-validation#post-56061</link>
			<pubDate>Fri, 20 Apr 2012 19:20:59 +0000</pubDate>
			<dc:creator>petitshoo</dc:creator>
			<guid isPermaLink="false">56061@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;So, the line in the code would look like this?&#60;/p&#62;
&#60;p&#62;  if($result[&#34;is_valid&#34;] &#38;amp;&#38;amp; $a === $b($value)){&#60;/p&#62;
&#60;p&#62;And where do I define the words I want to validate?  In place of the b?&#60;/p&#62;
&#60;p&#62;Thanks for your help!  I think I'm in over my head.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "How to check a field for a specific word using gform validation?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-check-a-field-for-a-specific-word-using-gform-validation#post-56059</link>
			<pubDate>Fri, 20 Apr 2012 19:12:24 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">56059@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This might help you understand how to do comparisons in PHP - &#60;a href=&#34;http://php.net/manual/en/language.operators.comparison.php&#34; rel=&#34;nofollow&#34;&#62;http://php.net/manual/en/language.operators.comparison.php&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>petitshoo on "How to check a field for a specific word using gform validation?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-check-a-field-for-a-specific-word-using-gform-validation#post-56053</link>
			<pubDate>Fri, 20 Apr 2012 18:03:24 +0000</pubDate>
			<dc:creator>petitshoo</dc:creator>
			<guid isPermaLink="false">56053@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Okay, so I'm adding the PHP code from the Documentation section (&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_field_validation)&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_field_validation)&#60;/a&#62;.  However, I want to target a word, not a number.  I am a novice at PHP and don't know what I should be using for this line in the validation since I am not using a number:&#60;/p&#62;
&#60;p&#62;if($result[&#34;is_valid&#34;] &#38;amp;&#38;amp; intval($value) &#38;gt; 10){&#60;/p&#62;
&#60;p&#62;Please help soon!  I have to have this complete very quickly.&#60;br /&#62;
Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>petitshoo on "How to check a field for a specific word using gform validation?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-check-a-field-for-a-specific-word-using-gform-validation#post-56050</link>
			<pubDate>Fri, 20 Apr 2012 17:40:24 +0000</pubDate>
			<dc:creator>petitshoo</dc:creator>
			<guid isPermaLink="false">56050@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Did you ever figure this out?  I'm trying to do the same thing, but the documentation provided doesn't help me much (I'm not a php programmer...I know enough to get in trouble).&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>demo38 on "How to check a field for a specific word using gform validation?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-check-a-field-for-a-specific-word-using-gform-validation#post-47793</link>
			<pubDate>Mon, 30 Jan 2012 15:18:31 +0000</pubDate>
			<dc:creator>demo38</dc:creator>
			<guid isPermaLink="false">47793@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;No thoughts on this?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>demo38 on "How to check a field for a specific word using gform validation?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-check-a-field-for-a-specific-word-using-gform-validation#post-47078</link>
			<pubDate>Sun, 22 Jan 2012 14:36:50 +0000</pubDate>
			<dc:creator>demo38</dc:creator>
			<guid isPermaLink="false">47078@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello,&#60;br /&#62;
I'm building a membership site for a client. It's a paid site, and using s2member to control registrations. The catch is, he wants to be able to give out code(s) that would allow for free multiple month trials, without requiring the user to pay / signup afterwards. There isn't any way to do this s2member, other than using a free registration form. The obvious fallback to that, is he only wants people with the codes to have access to the free registration forms, not open to everyone...&#60;/p&#62;
&#60;p&#62;Hence, I would like to use a simple Gravity Form on it's own page, asking the user to input their voucher code, and if that voucher code matches, accept it and redirect the user to the free registration form.&#60;/p&#62;
&#60;p&#62;gform validation sounds like exactly what I need to do this, but I'm not sure how to modify the VIN example shown here &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_validation%22_Hook&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_validation%22_Hook&#60;/a&#62; in the documentation.&#60;/p&#62;
&#60;p&#62;It would only need to check one form field, for any of 3 possible hard-coded voucher codes, say, 'CODE-1', 'CODE-2' or 'CODE-3'&#60;/p&#62;
&#60;p&#62;I assume the function for pulling the input data in the example remains the same, it's the check for function is_vin($vin) { that would need revised to check against a couple possible codes. &#60;/p&#62;
&#60;p&#62;Would this be easy to modify?&#60;br /&#62;
Thanks for your thoughts, Jonathon
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
