gform_suppress_confirmation_redirect

Description

Use this filter to suppress the default page or redirect confirmation type behavior after submission. This can be especially helpful if you are attempting to override the default behavior of these confirmation types such as opening the redirect in a new tab similar to the following example in our documentation using gform_confirmation.

Usage

The following would apply to all forms:

add_filter( 'gform_suppress_confirmation_redirect', '__return_true' );

Parameters

  • $suppress_redirect bool

    Indicates whether the confirmation redirect header should be suppressed. Defaults to false.

Placement

This code should be placed in the functions.php file of your active theme.

Since

This filter was added in Gravity Forms version 2.3.

Source Code

This filter is located in the following methods in form_display.php:

  • GFFormDisplay::process_form()
  • GFFormDisplay::handle_confirmation()

This filter is also located in the following methods in api.php:

  • GFAPI::submit_form()