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);
}