This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Use this filter to enhance the flexibility of the autocomplete results. In version 1.2.1, this is no longer filtered by default.
Usage
add_filter( 'frm_geo_autocomplete_options', 'FrmGeoAppController::use_geocode_autocomplete_type' );
Parameters
- None
Examples
Use geocode autocomplete
Use this code example to narrow down the results from the Place Autocomplete service to only geocoding results. This request clarifies results when the specified location may be undefined.
add_filter( 'frm_geo_autocomplete_options', 'FrmGeoAppController::use_geocode_autocomplete_type' );
Use establishment autocomplete
Use this code example to narrow down the results from the Place Autocomplete service to only businesses.
add_filter( 'frm_geo_autocomplete_options', 'FrmGeoAppController::use_establishment_autocomplete_type' );
Use address autocomplete
Use this code example to narrow down the results from the Place Autocomplete service to only geocoding results with a precise address. It could be useful when you know the user is looking for a fully specified address and want to optimize the search results.
add_filter( 'frm_geo_autocomplete_options', 'FrmGeoAppController::use_address_autocomplete_type' );