Adding filter to keep gravity forms from creating post entries
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 9 Jun 2016 15:40:54 +0000 (11:40 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 9 Jun 2016 15:40:54 +0000 (11:40 -0400)
If we we custom fields they will create a post entry.
This will keep any form from adding one.

functions.php

index 1a24888..88636b1 100644 (file)
@@ -388,5 +388,8 @@ function glm_per_product_rates_only( $rates, $package ) {
   return $rates;
 
 }
-
+add_filter( 'gform_disable_post_creation', 'disable_post_creation', 10, 3 );
+function disable_post_creation( $is_disabled, $form, $entry ) {
+    return true;
+}
 ?>