Created
July 19, 2024 08:52
-
-
Save matty0501/c027e3fd44a9da536605c6fef45d72b9 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Gravity Perks // Populate Anything // LMT Extract First Letter | |
* https://gravitywiz.com/documentation/gravity-forms-populate-anything/ | |
* | |
* Extract the first letter of a string using a Live Merge Tag | |
*/ | |
// Update "123" to your form ID; and "4" to the field ID you are copying from. | |
add_filter( 'gppa_live_merge_tag_value_123_4', function( $value ) { | |
return substr( $value, 0, 1 ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment