Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gravity Perks // GP Copy Cat // Copy Label (instead of Value)
<!--
Gravity Perks // GP Copy Cat // Copy Label (instead of Value)
http://gravitywiz.com/documentation/gravity-forms-copy-cat/
Instructions:
1. Add an HTML field to your form.
2. Copy and paste the entire contents of this snippet into the "Content" field setting.
-->
<script>
gform.addFilter( 'gppc_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;
} );
</script>
@MaxwellAdams

This comment has been minimized.

Copy link

@MaxwellAdams MaxwellAdams commented Aug 3, 2017

hi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment