Created
December 9, 2022 20:25
-
-
Save scyt/78f3a5a9eadeb722a398859f44099122 to your computer and use it in GitHub Desktop.
Prepend Live Merge Tags with Dash Character
This file contains 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
<?php | |
// Update "123" with your form ID and "4" with your source field ID. | |
add_filter( 'gppa_live_merge_tag_value_123_4', function( $value, $merge_tag, $form, $field_id, $entry_values ) { | |
if ( !$value ) { | |
return $value; | |
} | |
return "-" . $value; | |
}, 10, 5 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment