Change No Choices Text

Code

Filename: gppa-change-no-choices-text.php

<?php
/**
 * Gravity Perks // GP Populate Anything // Change No Choices Text
 * https://gravitywiz.com/documentation/gravity-forms-populate-anything/
 */
// Replace "123" with your form ID and "4" with your field ID.
add_filter( 'gppa_no_choices_text', function ( $label, $field ) {
	if ( $field->formId == 123 and $field->id == 4 ) {
		$label = 'No Post(s) Found';
	}
	return $label;
}, 10, 2 );

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.