gform_duplicate_field_link

Description

The gform_duplicate_field_link filter allows for modification of the form field duplicate link. This will change the link for all fields.

Usage

add_filter( 'gform_duplicate_field_link', 'your_function_name' );

Parameters

VariableTypeDescription
$duplicate_field_linkstringThe Duplicate Field Link (in HTML)

Examples

Remove duplicate action from all fields.

The following example effectively removes the duplicate field action button from rendering in the form editor.

add_filter( 'gform_duplicate_field_link', '__return_empty_string' );

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 hook is located in includes/fields/class-gf-field.php.