Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save claygriffiths/fc2f3976f6591cd1d1fbe7e552b56b6b to your computer and use it in GitHub Desktop.
Save claygriffiths/fc2f3976f6591cd1d1fbe7e552b56b6b to your computer and use it in GitHub Desktop.
GP Populate Anything: Use Choice Value instead of Label
<?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