Gform disable post creation

Description

Use this filter to disable post creation when submitting a Gravity Form

Usage

<?php
add_filter("gform_disable_post_creation", "disable_post_creation", 10, 3);
?>

You can also specify this per form by adding the form id after the hook name.

<?php
add_filter("gform_disable_post_creation_6", "disable_post_creation", 10, 3);
?>

Parameters

$is_disabled

(bool) Variable to be filtered. Set it to true to prevent posts from being created

$form

(Form Object) Current form.

$entry

(array) Current Entry array


Examples

This example disables the post creation process for all forms


<?php
add_filter("gform_disable_post_creation", "disable_post_creation", 10, 3);
function disable_post_creation($is_disabled, $form, $entry){
    return true;
}
?>

Source Code

This filter is located in form_display.php

Search the Documentation