gppa_no_choices_text
Description
Filter the field text (or label) for choice-based fields that are dynamically populated but have no available objects based on the current filters.
Usage
Filter the missing filter choice label for all fields.
add_filter( 'gppa_no_choices_text', 'my_custom_function' );
Parameters
label string
Default:
'– ' . esc_html__( 'No Results', 'gp-populate-anything' ) . ' –'
Choice label.
$field GF_Field
Current field.
Examples
Change No Choices Text
<?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 );
Since
This filter is available since GP Populate Anything 1.0.