gform_signature_delete_file_pre_delete_entry

Description

Enables the ability to disable deletion of the signature file or trigger deletion at a later time when an entry is deleted.

Usage

add_filter( 'gform_signature_delete_file_pre_delete_entry', 'your_function_name', 10, 4 );

Parameters

  • $delete_file bool

    Indicates whether the file should be deleted. Defaults to true.

  • $form Form Object

    The current form.

  • $entry_id int

    The ID of the current entry.

  • $field_id int

    The ID of the current field.

Examples

//keep signature
add_filter( 'gform_signature_delete_file_pre_delete_entry', 'keep_signature', 10, 4 );
function keep_signature( $delete_file, $form, $entry_id, $field_id ){
	return false;
}

Placement

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

Since

This filter was added in version 3.8.

Source Code

This filter is located in GFSignature::delete_entry() in class-gf-signature.php.