gform_confirmation_actions

Description

Modify the list of actions that display below the Confirmation Name on the Confirmations list view.

Usage

add_action( 'gform_confirmation_actions', 'my_custom_function' );

Parameters

ParameterTypeDescription
$actionsarrayAn array of current confirmation actions.

Examples

Add custom confirmation actions.

This example demonstrates how you can add custom confirmation actions.
Please note: the myCustomDuplicateConfirmationFunction() does not exist so the form will not actually be duplicated if you add this code sample.

add_action( 'gform_confirmation_actions', 'my_custom_confirmation_action' );
function my_custom_confirmation_action( $actions ) {

	// adds a 'duplicate' action with a link that triggers some functionaliy on click
	$actions['duplicate'] = '<a href="javascript:void(0)" onclick="myCustomDuplicateConfirmationFunction();">Duplicate</a>';

	return $actions;
}

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?

Source Code

This filter is located in GFConfirmationTable::column_name() in form_settings.php.