Created
March 26, 2019 12:32
-
-
Save spivurno/d3ddce62882808d6dae177c3a528e2f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
gform.addFilter( 'gppc_copied_value', function( value, $elem, data ) { | |
// Update "1" to the ID of the field being copied to. | |
if( data.target == 1 && value ) { | |
value = value.split( '|' )[0]; | |
} | |
return value; | |
} ); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👉 This Gist has been migrated to the Gravity Wiz Snippet Library:
https://github.com/gravitywiz/snippet-library/blob/master/gp-copy-cat/gpcc-copy-product-value.js