gppa_no_choices_value
Description
Filter the default choice value for choice-based fields that are dynamically populated but have no available objects based on the current filters.
Usage
Filter the missing filter choice value for all fields.
add_filter( 'gppa_no_choices_value', 'my_custom_function' );
Parameters
Example
Change the Value of a Choice-based Field When No Result Is Returned
add_filter( 'gppa_no_choices_value', function ( $label, $field ) {
// Update 123 to the Form ID and 1 to the Field ID
if ( $field->formId == 123 and $field->id == 1 ) {
$label = 'No Result';
}
return $label;
}, 10, 2 );
Since
This filter is available since GP Populate Anything 1.0.