DescriptionUsageParametersExample(s)PlacementSinceSource Code
Description
The 「gform_duplicate_field」 JavaScript filter in Gravity Forms allows the field being duplicated in the Form Editor to be modified.
Usage
The following would apply to all field input types:
1gform.addFilter('gform_duplicate_field', 'change_duplicate' );
To target a specific type of field, append the field input type (ie: text, select, radio) to the hook name. (format: gform_duplicate_field_FIELDTYPE)
1gform.addFilter('gform_duplicate_field_text', 'change_duplicate' );
Parameters
field Field Object
The Field Object.
form Form Object
The Form Object.
Example(s)
This example uses the gform_admin_pre_render filter to load the hook and set the label of the field being duplicated to 『Duplicated Field』.
12345678910111213add_action( 'gform_admin_pre_render', 'add_duplicate_filter' );function add_duplicate_filter( $form ) { ?>