Additional forms with another location center for map
-
Hello.
How can we make additional forms with another location center for maps via functions.php ?
Now we use
function wpf_wpforms_geolocation_map_default_location() {
return [ 'lat' => lat, 'lng' => lng, ];}
add_filter( ‘wpforms_geolocation_map_default_location’, ‘wpf_wpforms_geolocation_map_default_location’, 10 );/**
- Change zoom level for the Geolocation addon map.
* - @link https://wpforms.com/developers/how-to-change-default-location-for-geolocation-addon/
*/
function wpf_wpforms_geolocation_map_zoom( $zoom, $context ) {
// This will change the zoom level while viewing the entry. if ( 'entry' === $context ) { return 10; } // This will change the zoom level on the map that displays on the form above/under the Address field. if ( 'field' === $context ) { return 15; } return $zoom;}
add_filter( ‘wpforms_geolocation_map_zoom’, ‘wpf_wpforms_geolocation_map_zoom’, 10, 2 );Thank you.
- Change zoom level for the Geolocation addon map.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Additional forms with another location center for map’ is closed to new replies.