<?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: Validation message not allowing confirmation message</title>
		<link>https://legacy.forums.gravityhelp.com/topic/validation-message-not-allowing-confirmationn-message</link>
		<description>Gravity Support Forums Topic: Validation message not allowing confirmation message</description>
		<language>en-US</language>
		<pubDate>Wed, 08 Apr 2026 16:15:56 +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/validation-message-not-allowing-confirmationn-message" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Validation message not allowing confirmation message"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-message-not-allowing-confirmationn-message#post-35185</link>
			<pubDate>Tue, 13 Sep 2011 14:29:19 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">35185@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Do you have an example of what donate.php returns?&#60;/p&#62;
&#60;p&#62;$is_valid will be true or false in the code example &#60;a href=&#34;http://pastie.org/1769048&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/1769048&#60;/a&#62; (see lines 140 and 143 which are returned by the function.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>BIGLIFE on "Validation message not allowing confirmation message"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-message-not-allowing-confirmationn-message#post-35085</link>
			<pubDate>Mon, 12 Sep 2011 15:46:56 +0000</pubDate>
			<dc:creator>BIGLIFE</dc:creator>
			<guid isPermaLink="false">35085@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;OK, here is what I've got so far:&#60;/p&#62;
&#60;p&#62;I am wanting to run this function to validate that the online donation goes through with my online payment processor and if not to display a custom error message:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// Tie our validation function to the &#38;#39;gform_validation&#38;#39; hook
add_filter(&#38;#39;gform_validation_9&#38;#39;, &#38;#39;validate_donation&#38;#39;);
function validate_donation($validation_result) {

	// Make a call to donate.php validation function to validate the donation
	$is_valid = process_payment();

	// If the payment is valid we don&#38;#39;t need to do anything
	if($is_valid){
   		// Return the validation result
    	return $validation_result;
		}
	else{
		// Fail the validation for the entire form
		$validation_result[&#38;#39;is_valid&#38;#39;] = false;
   		// Return the validation result
    	return $validation_result;
		}
}

// This function runs the Donation script for eTapestry/SAGE
function process_payment() {
    include(&#38;quot;donate.php&#38;quot;); 	//this is the processing of the online donation
}

// This function changes the main validation message
add_filter(&#38;quot;gform_validation_message_9&#38;quot;, &#38;quot;change_message&#38;quot;, 10, 2);
function change_message($message, $form){
global $donate_error;
 	return &#38;#39;&#38;lt;div id=&#38;quot;donate_error&#38;quot;&#38;gt;&#38;#39; . &#38;quot;An error occurred while processing your submission.&#38;lt;br/&#38;gt;Please modify your information based on the error below and try again.&#38;lt;br/&#38;gt;&#38;lt;br/&#38;gt;&#38;quot; .  &#38;#39;&#38;lt;span&#38;gt;&#38;#39; . &#38;quot;Error: {$donate_error}&#38;quot; . &#38;#39;&#38;lt;/span&#38;gt;&#38;#39; . &#38;#39;&#38;lt;/div&#38;gt;&#38;#39;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;If the payment info goes through then I would like to show the confirmation message assigned by the form notifications and if not then I want the custom message to be displayed via the function change_message function. I have used some of the code from your sample code found here (&#60;a href=&#34;http://pastie.org/1769048&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/1769048&#60;/a&#62;) .  What kind or response is the $is_valid variable looking for from the process_payment function? Is it looking for true/false? I currently am getting an error message no matter if the payment is valid or not.....its throwing an error either way. Any advise?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Validation message not allowing confirmation message"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-message-not-allowing-confirmationn-message#post-34859</link>
			<pubDate>Thu, 08 Sep 2011 16:18:20 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">34859@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm not sure I completely follow, the description is a little confusing.  Can you provide a link to the form and give me step by step instructions on how to replicate it so I can see what you are talking about?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>BIGLIFE on "Validation message not allowing confirmation message"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-message-not-allowing-confirmationn-message#post-34845</link>
			<pubDate>Thu, 08 Sep 2011 15:06:57 +0000</pubDate>
			<dc:creator>BIGLIFE</dc:creator>
			<guid isPermaLink="false">34845@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I am using the gf_validation_message function to change the main validation message.  All is working except if I submit the form and it kicks back an error and thus the new message then when the info in question is corrected and the form is resubmitted the confirmation message does not appear and the error message remains. Any Ideas?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
