Created
October 2, 2019 01:11
-
-
Save claygriffiths/fc2f3976f6591cd1d1fbe7e552b56b6b to your computer and use it in GitHub Desktop.
GP Populate Anything: Use Choice Value instead of Label
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 | |
/** | |
* See https://gravitywiz.com/documentation/how-do-i-install-a-snippet/ for details on how to install snippets like these. | |
* | |
* The following snippet will set the values in Gravity Forms admin entry view to show the values rather than choices. | |
** | |
* $form_id is the form you wish to restrict | |
*/ | |
add_action('admin_init', function() { | |
remove_filter( 'gform_entry_field_value', array( gp_populate_anything(), 'entry_field_value' ), 20 ); | |
remove_filter( 'gform_entries_field_value', array( gp_populate_anything(), 'entries_field_value' ), 20 ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment