Description
Filter the copied value before moving it over.
Usage
gform.addFilter( 'gpcc_copied_value', 'my_custom_function' );
Parameters
-
Current value being copied.
targetElem array
A jQuery object with the target element.
field mixed
Current field being copied.
Example
Copy Label Instead of Value
Copy a choice-based (Radio Button, Drop Down, etc.) field’s label instead of its value.
gform.addFilter( 'gpcc_copied_value', function( value, $elem, data ) {
$source = jQuery( '#input_' + data.sourceFormId + '_' + data.source );
if( $source.is( 'select' ) ) {
value = $source.find( 'option:selected' ).text();
}
return value;
} );
Since
This filter is available since Gravity Forms Copy Cat 1.4.22.