Use Choice Value Instead of Label in Admin

By default, Populate Anything will display choice labels in the Entry List and Entry Detail views. This snippet reverts to the default Gravity Forms behavior of showing values instead for Populate Anything enabled fields.

Code

Filename: gppa-use-choice-value-instead-of-label.php

<?php
/**
 * Gravity Perks // Populate Anything // Use Choice Value Instead of Label in Admin
 * https://gravitywiz.com/documentation/gravity-forms-populate-anything/ 
 *
 * By default, Populate Anything will display choice labels in the Entry List and Entry Detail views.
 * This snippet reverts to the default Gravity Forms behavior of showing values instead for Populate Anything enabled fields.
 */
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 );
});

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.