PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Proposed change to save logic: Add a filter to the handle_submission function.

  1. 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:

    public static function handle_submission($form, &$lead, $ajax=false){
    
            //insert submissing in DB
            $disable_insert = apply_filters("gform_disable_field_insert_{$form["id"]}", apply_filters("gform_disable_field_insert", false, $form, $lead), $form, $lead);
            if ( !$disable_insert ) {
            	RGFormsModel::save_lead($form, $lead);
    
            	//reading lead that was just saved
            	$lead = RGFormsModel::get_lead($lead["id"]);
    	}
    	else {
    		do_action( "gform_custom_field_insert", $form, $lead );
    		do_action( "gform_custom_field_insert_{$form["id"]}", $form, $lead );
    	}
    
            $disable_post = apply_filters("gform_disable_post_creation_{$form["id"]}", apply_filters("gform_disable_post_creation", 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);
        }
    Posted 8 years ago on Monday September 19, 2011 | Permalink
  2. I'll have our lead developer take a look.

    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.

    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:

    http://www.gravityhelp.com/documentation/page/Gform_after_submission

    So i'm not sure how your hook would differ from the existing methods.

    Posted 8 years ago on Tuesday September 20, 2011 | Permalink