• 1.
    gform.addFilter( 'gpcc_copied_value', function( value, $elem, data ) {
  • 2.
      // Update 4 to the ID of the Hidden field
  • 3.
    	if( data.target == 4 && value ) {
  • 4.
            var chars = value.slice(0, value.search(/\d/));
  • 5.
            var num = value.replace(chars, '');
  • 6.
    	value = num;
  • 7.
       }
  • 8.
        return value;
  • 9.
    } );
  • 10.
     
gform.addFilter( 'gpcc_copied_value', function( value, $elem, data ) { // Update 4 to the ID of the Hidden field if( data.target == 4 && value ) { var chars = value.slice(0, value.search(/\d/)); var num = value.replace(chars, ''); value = num; } return value; } );

Copy Code to Clipboard Raw

Sign-in or Create a Free Account.

Snippi uses Twitter or Facebook to register and create accounts. Registration will enable you to keep track of your snippets. We never spam your timeline or wall. Ever.

Sign-in with Facebook Sign-in with Twitter