<?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: Field Validation across Multiple Forms</title>
		<link>https://legacy.forums.gravityhelp.com/topic/field-validation-across-multiple-forms</link>
		<description>Gravity Support Forums Topic: Field Validation across Multiple Forms</description>
		<language>en-US</language>
		<pubDate>Sun, 05 Apr 2026 17:56:34 +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/field-validation-across-multiple-forms" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Field Validation across Multiple Forms"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/field-validation-across-multiple-forms#post-136233</link>
			<pubDate>Wed, 30 Jan 2013 08:32:15 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">136233@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You can validate all forms, one form, or one field in one form.  To validate all forms, your quantity field would need to be the same ID in every form, which is not likely I don't think (if it is, then it's no problem to apply the same validation to the same field in every form.)&#60;/p&#62;
&#60;p&#62;However, you can write one function to force whole numbers, then add it to every form with a &#60;em&#62;add_filter&#60;/em&#62; line for each form and field you want to validate.  It's not optimal, especially if you are creating new forms all the time.&#60;/p&#62;
&#60;p&#62;The code you add to functions.php would look like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// form 17, field 4
add_filter(&#38;quot;gform_field_validation_17_4&#38;quot;, &#38;quot;force_whole_number&#38;quot;, 10, 4);
// form 12, field 20
add_filter(&#38;quot;gform_field_validation_12_20&#38;quot;, &#38;quot;force_whole_number&#38;quot;, 10, 4);
// form 4, field 11
add_filter(&#38;quot;gform_field_validation_4_11&#38;quot;, &#38;quot;force_whole_number&#38;quot;, 10, 4);
// etc
// then add your function one time
function force_whole_number ($result, $value, $form, $field){
  // your code here
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Josh Fialkoff on "Field Validation across Multiple Forms"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/field-validation-across-multiple-forms#post-129552</link>
			<pubDate>Wed, 23 Jan 2013 12:04:10 +0000</pubDate>
			<dc:creator>Josh Fialkoff</dc:creator>
			<guid isPermaLink="false">129552@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
Is it possible to change field validation criteria for a specific field in multiple forms?&#60;br /&#62;
For instance, I want to make it so that all quantity fields must contain a single whole number.&#60;br /&#62;
Do I need to change the validation for EACH form which has a quantity field or can I do this for all forms at once?&#60;br /&#62;
Thanks,&#60;br /&#62;
Josh&#60;/p&#62;
&#60;p&#62;&#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;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
