# Filtering Autosuggest Field

**URL:** <https://community.wpbeaverbuilder.com/t/filtering-autosuggest-field/12131>\
**Category:** Developers\
**Tags:** beaver-builder\
**Created:** [June 2, 2020, 12:22pm UTC](https://community.wpbeaverbuilder.com/t/filtering-autosuggest-field/12131 "2020-06-02T12:22:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayhill](https://community.wpbeaverbuilder.com/user_avatar/community.wpbeaverbuilder.com/jayhill/32/2335_2.png) [@jayhill](https://community.wpbeaverbuilder.com/u/jayhill)\
**Post date:** [June 2, 2020, 12:22pm UTC](https://community.wpbeaverbuilder.com/t/filtering-autosuggest-field/12131/1 "2020-06-02T12:22:12Z")

</div>

Hey there! I’ve got a question on properly filtering the `get_autosuggest_values` function from class-fl-builder-auto-suggest.php. I’ve successfully added my own custom action `fl_as_hubspot` in the fl\_builder\_autosuggest function and that successfully makes an API call and returns the proper data. However, whenever I go to edit the page where I’ve embedded this module and go to change the settings, what normally shows the name of the post if I use posts, just shows a blank value in the module.

I see that the default case for get\_value in class-fl-builder-auto-suggest.php should call my action\_value function if my function exists. I’ve put a `hubspot_value` function into a helper file that loads bare classes as everything else in my custom plugin is class-based.

Is there an example anywhere on how I can short circuit the get\_value function properly to make my API call so that I can get the data from the API I need?

---

<div class="post-metadata">

**Author:** ![geowrge](https://community.wpbeaverbuilder.com/user_avatar/community.wpbeaverbuilder.com/geowrge/32/4143_2.png) [@geowrge](https://community.wpbeaverbuilder.com/u/geowrge)\
**Post date:** [August 23, 2023, 11:18am UTC](https://community.wpbeaverbuilder.com/t/filtering-autosuggest-field/12131/2 "2023-08-23T11:18:42Z")

</div>

Hey! Any solution for this? A simple filter in the `get_value` function would do the trick.

A hack would be to define the actions as a namespace + class + partial method so `call_user_func_array( $action . '_value', array( $value, $data ) )` would do something like `call_user_func_array( 'Some\\Namespace\\MyClass::get_something' . '_value', array( $value, $data ) )` but that’s ugly…
