<?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: Proposed change to save logic: Add a filter to the handle_submission function.</title>
		<link>https://legacy.forums.gravityhelp.com/topic/proposed-change-to-save-logic-add-a-filter-to-the-handle_submission-function</link>
		<description>Gravity Support Forums Topic: Proposed change to save logic: Add a filter to the handle_submission function.</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 19:41:05 +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/proposed-change-to-save-logic-add-a-filter-to-the-handle_submission-function" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "Proposed change to save logic: Add a filter to the handle_submission function."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/proposed-change-to-save-logic-add-a-filter-to-the-handle_submission-function#post-35703</link>
			<pubDate>Mon, 19 Sep 2011 20:23:46 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">35703@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'll have our lead developer take a look.&#60;/p&#62;
&#60;p&#62;It's already possible to prevent the form data from saving using hooks and there is a forum post that discusses how to do this.  The form data has to be deleted as the last step in the form processing because things like the email notifications and the entry object are used for integration purposes so the entry needs to exist for these things to be triggered.  &#60;/p&#62;
&#60;p&#62;It's already possible to insert data into another database.   In Gravity Forms v1.6+ you would use the gform_after_submission hook which is documented here: &#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_after_submission&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_after_submission&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;So i'm not sure how your hook would differ from the existing methods.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>provpubs on "Proposed change to save logic: Add a filter to the handle_submission function."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/proposed-change-to-save-logic-add-a-filter-to-the-handle_submission-function#post-35660</link>
			<pubDate>Mon, 19 Sep 2011 14:43:02 +0000</pubDate>
			<dc:creator>provpubs</dc:creator>
			<guid isPermaLink="false">35660@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I.e. to prevent GF from saving to it's own tables. In form_display.php modify the handle_submission function as follows to allow a developer to save the data in a custom data-store:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;public static function handle_submission($form, &#38;amp;$lead, $ajax=false){

        //insert submissing in DB
        $disable_insert = apply_filters(&#38;quot;gform_disable_field_insert_{$form[&#38;quot;id&#38;quot;]}&#38;quot;, apply_filters(&#38;quot;gform_disable_field_insert&#38;quot;, false, $form, $lead), $form, $lead);
        if ( !$disable_insert ) {
        	RGFormsModel::save_lead($form, $lead);

        	//reading lead that was just saved
        	$lead = RGFormsModel::get_lead($lead[&#38;quot;id&#38;quot;]);
	}
	else {
		do_action( &#38;quot;gform_custom_field_insert&#38;quot;, $form, $lead );
		do_action( &#38;quot;gform_custom_field_insert_{$form[&#38;quot;id&#38;quot;]}&#38;quot;, $form, $lead );
	}

        $disable_post = apply_filters(&#38;quot;gform_disable_post_creation_{$form[&#38;quot;id&#38;quot;]}&#38;quot;, apply_filters(&#38;quot;gform_disable_post_creation&#38;quot;, false, $form, $lead), $form, $lead);
        if(!$disable_post){
            //creates post if the form has any post fields
            $post_id = RGFormsModel::create_post($form, $lead);
        }

        //send auto-responder and notification emails
        self::send_emails($form, $lead);

        //display confirmation message or redirect to confirmation page
        return self::handle_confirmation($form, $lead, $ajax);
    }&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
