Show name fields as initials
Let's say you have a View to display donations.
In most cases, donors want to keep their names private; they want to make anonymous donations instead. For these cases, GravityView has an option for name fields to display initials instead of full names.
With the option "Show as initials" checked:
This setting can also be set for specific subfields of the name field, like the last name field:
For Developers
This functionality also has a WordPress filter that allows further customization.
add_filter('gk/gravityview/fields/name/initials', 'customize_initials', 10, 2); function customize_initials($display_value, $gravityview) { $display_value = strtolower($display_value); return $display_value; }
Read here how to add these code samples to your website: Where to put code samples.