Hi.
With the plugin, can I know the user’s location when they submit Contact Form 7? How do I do it?
Greetings.
]]>I cannot get the map to show up in the form when displayed on a page, but it will load with the live preview. The error comes from “Uncaught ReferenceError: cf7GoogleMap is not defined” but im unsure how to proceed
]]>is it possible to select an area on the map?
when I was looking for information about a similar plugin, I found an article about your plugin, which had screenshots of the map in the upper right corner with a panel with area selection tools. but when installing the plugin and settings, I did not see this panel
https://webdesign.tutsplus.com/how-to-add-maps-to-your-wordpress-contact-form–cms-34212t
]]>@vans1994 I couldn’t get back to you earlier on your thread with the above issue. This is now fixed in v1.9.0. Could you please try it on your site and let me know if it works for you.
]]>Hi,
I managed to make Google Maps worked in Contact Form 7 but I need to resize it. Could someone help me on doing this.
Thanks. Here is the image of what I’m saying.
https://photos.app.goo.gl/gKefg4UMDwm9c4Nq6
]]>
Hello! We tried to get the Satellite view whit labels to work by default, but we couldn’t get it to work. The snippet you provide doesn’t seem to work with labels, could you test it or suggest a possible solution?
]]>Does anyone get this plugin to work? It doesn’t work for me. There is no connection to Google-Account. Other plugins work with the used api key.
]]>Hi,
I’ve set everything up to the point of adding a map in to a form on a page but get a fatal error when I either try to save the page within the page editor or when I try to view the page directly.
Page URL: Form test – Swarm
I turned on debug and can see the below error:
Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php:59
Stack trace:
#0 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/cf7-google-map/public/class-cf7-googlemap-public.php(196): include()
#1 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(551): Cf7_GoogleMap_Public->googleMap_shortcode_handler()
#2 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(460): WPCF7_FormTagsManager->scan_callback()
#3 [internal function]: WPCF7_FormTagsManager->replace_callback()
#4 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(356): preg_replace_callback()
#5 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(328): WPCF7_FormTagsManager->scan()
#6 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/contact-form.php(867): WPCF7_FormTagsManager->replace_all()
#7 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/contact-form.php(933): WPCF7_ContactForm->replace_all_form_tags()
#8 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/contact-form.php(633): WPCF7_ContactForm->form_elements()
#9 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/contact-form-functions.php(235): WPCF7_ContactForm->form_html()
#10 [internal function]: {closure}()
#11 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/l10n.php(147): call_user_func()
#12 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/contact-form-functions.php(239): wpcf7_switch_locale()
#13 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/shortcodes.php(355): wpcf7_contact_form_tag_func()
#14 [internal function]: do_shortcode_tag()
#15 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/shortcodes.php(227): preg_replace_callback()
#16 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/class-wp-hook.php(308): do_shortcode()
#17 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#18 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/post-template.php(255): apply_filters()
#19 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/themes/understrap/loop-templates/content-page.php(28): the_content()
#20 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/template.php(785): require('/home/li26yuh0q...')
#21 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/template.php(718): load_template()
#22 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/general-template.php(204): locate_template()
#23 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/themes/understrap/page.php(38): get_template_part()
#24 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/template-loader.php(106): include('/home/li26yuh0q...')
#25 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-blog-header.php(19): require_once('/home/li26yuh0q...')
#26 /home/li26yuh0q757/public_html/dev.swarm.eco/index.php(17): require('/home/li26yuh0q...')
#27 {main} thrown in /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php on line 59
When I check line 59 I see:
require plugin_dir_path( __FILE__ ) . 'includes/class-cf7-googlemap.php';
Any idea? I’ve tried turning all other plugins off but had no luck.
Thanks ??
Hi i got this problem, suddenly my cf7 form with a map from your plugin stopped working .I get this error, any idea ?
[17-Feb-2023 12:46:46 UTC] PHP Fatal error: Uncaught ValueError: Path cannot be empty in /home/.../domains/www.....pl/public_html/wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php:58
Stack trace:
#0 /home/.../domains/www.....pl/public_html/wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php(58): get_headers('')
#1 /home/.../domains/www.....pl/public_html/wp-content/plugins/cf7-google-map/public/class-cf7-googleMap-public.php(188): include('/home/veojhiyyp...')
#2 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(551): Cf7_GoogleMap_Public->googleMap_shortcode_handler(Object(WPCF7_FormTag))
#3 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(460): WPCF7_FormTagsManager->scan_callback(Array, true)
#4 [internal function]: WPCF7_FormTagsManager->replace_callback(Array)
#5 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(356): preg_replace_callback('/(\\[?)\\[(group|...', Array, '<div id="formBo...')
#6 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(328): WPCF7_FormTagsManager->scan('<div id="formBo...', true)
#7 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/contact-form.php(861): WPCF7_FormTagsManager->replace_all('<div id="formBo...')
#8 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/contact-form.php(927): WPCF7_ContactForm->replace_all_form_tags()
#9 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/contact-form.php(627): WPCF7_ContactForm->form_elements()
#10 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/contact-form-functions.php(229): WPCF7_ContactForm->form_html(Array)
#11 [internal function]: {closure}(Object(WPCF7_ContactForm), Array)
#12 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/l10n.php(147): call_user_func(Object(Closure), Object(WPCF7_ContactForm), Array)
#13 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/contact-form-functions.php(233): wpcf7_switch_locale('pl_PL', Object(Closure), Object(WPCF7_ContactForm), Array)
#14 /home/.../domains/www.....pl/public_html/wp-includes/shortcodes.php(355): wpcf7_contact_form_tag_func(Array, '', 'contact-form-7')
#15 [internal function]: do_shortcode_tag(Array)
#16 /home/.../domains/www.....pl/public_html/wp-includes/shortcodes.php(227): preg_replace_callback('/\\[(\\[?)(contac...', 'do_shortcode_ta...', '[contact-form-7...')
#17 /home/.../domains/www.....pl/public_html/wp-includes/class-wp-hook.php(308): do_shortcode('[contact-form-7...')
#18 /home/.../domains/www.....pl/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters('[contact-form-7...', Array)
#19 /home/.../domains/www.....pl/public_html/wp-includes/post-template.php(255): apply_filters('the_content', '[contact-form-7...')
#20 /home/.../domains/www.....pl/public_html/wp-content/themes/theissue/page.php(35): the_content()
#21 /home/.../domains/www.....pl/public_html/wp-includes/template-loader.php(106): include('/home/veojhiyyp...')
#22 /home/.../domains/www.....pl/public_html/wp-blog-header.php(19): require_once('/home/veojhiyyp...')
#23 /home/.../domains/www.....pl/public_html/index.php(17): require('/home/veojhiyyp...')
#24 {main}
thrown in /home/.../domains/www.....pl/public_html/wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php on line 58
]]>
Hello!
I would like to install this plugin, but I have this note:
Warning: This plugin has not been tested on your current version of WordPress.
My WordPress version is 6.1.1. Will I have problems if I install the plugin? Can you help me, please?
]]>Hi,
Is it possible to adjust the map height?
Thanks again for the great support and great plugin!
Thank you for the v1.8.4rc1 version which is available on GitHub.
The address lookup and autocomplete of the search field work perfectly, but I’m facing further issues below:
1. When there are repetitive fields. The search field displays the map on the last grid instead of the correct map.
2. The address fields not functional – not display reverse-geocode text address
3. The width of the search field in the repetitive fields becomes longer and exceeds the form, making the form look unsightly.
]]>Hello
sorry for my bad English.
The plugin works fine, thanks a lot.
I would like to put An address “From” and an adress “To” in a CF7 form.
Then I need to send both adress in my form email.
Is this possible with a single map?
Can I use 2 maps and 2 differents adresses in the same form?
thanks a lot for your kind reply
Regards
Guy
I am trying to pull the data from request of current location, say if someone is in an unrecognized area and they need to find their current location. if this is possible to request current location with this plugin and possibly auto-feed to the contact form?
]]>The translation file (cf7-googleMap.pot) seems to be broken and I’m unable to open it by Poedit.
]]>I have updated the php version to 8.1 and the form that includes the map has stopped working, it shows blank.
All plugins and wordpress are updated to the latest version.
If I go back to version 7.3.33 it does work.
The following error appears on the server:
Got error 'PHP message: PHP Fatal error: Uncaught ValueError: Path cannot be empty in /wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php:58\nStack trace:\n#0 /wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php(58): get_headers()\n#1 /wp-content/plugins/cf7-google-map/public/class-cf7-googleMap-public.php(188): include('...')\n#2 /wp-content/plugins/contact-form-7/includes/form-tags-manager.php(479): Cf7_GoogleMap_Public->googleMap_shortcode_handler()\n#3 /wp-content/plugins/contact-form-7/includes/form-tags-manager.php(395): WPCF7_FormTagsManager->scan_callback()\n#4 [internal function]: WPCF7_FormTagsManager->replace_callback()\n#5 /wp-content/plugins/contact-form-7/includes/form-tags-manager.php(291): preg_replace_callback()\n#6 /wp-content/plug...'
Hi there
First off, this is a fantastic addition to CF7 – brilliant work
My question is mainly as I want to detail some instructions to users on how to use the map – but once an address is entered into the search bar, the search bar stays there thus covering the “Map / Satellite” buttons.
Or, is there a way to default to Satellite instead of the map?
Either one would work, but if you could guide me here that would be great. Or if this is custom dev work then I am happy to pay for this to be done.
Thanks!
]]>Hey Aurovrata,
First of all I want to say ‘thank you‘ for this great plugin. I will definitely donate something, because I expect it to work cool after doing some ground work and also further investigations in the market.
But still I am experiencing troubles with it, especially with jQuery, as I am not able to configure everything as I would like to. Here is the page LINK. Following things I would like to achieve:
This is how my code looks like currently:
<p>[map your-location "zoom:18;clat:12.007117348757749;clng:79.8107937265215;lat:12.007089;lng:79.810600"]
<p id="line">Street + number [text your-address-line]</p>
<p id="pincode">ZIP Code [text your-address-pin]</p>
<p id="city">City [text your-address-city]</p>
[submit "Submit"]
<script type="text/javascript">
(function($){
$(document).ready( function(){
$('.cf7-google-map-container.your-location').on('update.cf7-google-map', function(e){
//the event has 5 address fields, e.address.line, e.address.city, e.address.pin, e.address.state, e.address.country.
//some fields may be empty.
$('p#line input').val(e.address.line);
$('p#pincode input').val(e.address.pin);
$('p#city input').val(e.address.city);
//Adjust map settings
add_filter('cf7_google_map_default_type', 'change_map_type', 10,2);
function change_map_type($type, $field){
//type must be either ROADMAP/SATELLITE/TERRAIN/HYBRID.
if('your-location' ==$field) $type = 'SATELLITE';
return $type;
}
//Adjust map controls
dd_filter('cf7_google_map_settings', 'use_custom_map_settings',10,2);
function use_custom_map_icon($settings, $field_name){
if( 'your-location' == $field_name ){
$settings['mapTypeControl']= false; //hide (true by default).
$settings['navigationControl']= false; //hide (true by default).
$settings['streetViewControl']= false; //hide (true by default).
$settings['zoomControl']=true; //show (false by default).
$settings['rotateControl']=true; //show (false by default).
$settings['fullscreenControl']=false; //hide (false by default).
$settings['rotateControl']= true; //show (false by default).
$settings['zoom']= 18; //set by default to the value initialised at the time of creating the form tag.
$settings['center'] = array('11.936825', '79.834278'); //set by default to the value initialised at the time of creating the form tag.
}
return $settings;
}
})
})
})(jQuery)
</script>
I kindly request some help regarding my chaos :-/
Thanks a lot!
]]>I want to take the postcode on the first step of the form and pass it to the map, so that the map centers on the users location. Is this possible?
]]>Hi,
I’m having an issue getting the hooks to work to change the settings of the map, I have added them to my functions.php file as well as on the page within php tags and still cannot get them to work.
Am I missing something? Any help appreciated thank you.
]]>Installed plugin and set up my API key(works with other map integrated stuff on my site)
Only get a white space instead of the map. Anyone have any ideas?
Hi guys,
I would like to create conditional fields, show a group, based on the city post results. I have tried the following but does not work.
show [group-map-promo] if [map-123] equals “Johannesburg”
Any suggestions?
Hello
My setup is default cf7 form with this map tag:
[map* map-349 id:qfmapid class:qfaddressmap "zoom:1;clat:28.156269;clng:63.323149;lat:12.007089;lng:79.810600"]
When visitor submits the form and the field is required but no address picked by visitor. its shows an empty error box with not error messsge.
It shows this error on the console debugger:
<pre><code>TypeError: Cannot read properties of null (reading 'classList')
at l (index.js?ver=5.5.6:1:2590)
at Array.forEach (<anonymous>)
at index.js?ver=5.5.6:1:3708
(anonymous) @ index.js?ver=5.5.6:1
Promise.catch (async)
c @ index.js?ver=5.5.6:1
(anonymous) @ index.js?ver=5.5.6:1
Setup WP version is 5.9.1 and its happening with every theme including default themes.
Your help is much appreciated
Thank you
Hello
I am using both your plugins (Google map for contact form 7 and the smart grid).
I am not good with coding but i need your help
I need to show the current user location when the map loads. I have seen the solution you shared here but i just couldn’t follow it.
Is it possible i get the direct code to copy and paste.
and also can i make my map size a bit bigger on mobile?
]]>Hello, I see the plugin is listing compatibility with post my cf7 form but I can not get it to map any data to a meta-field.
The meta-field just ends up being blank (not created for the post)
Just wondering if the compatibility is still there or if I’m doing something wrong.
Thank you!
Hello,
Is it possible to change the formatting of the address fields returned from user selection? I tried implementing custom address fields according to the FAQ #5, but the data is currently presented in a way that doesn’t really work in the site language.
For example, I want the (street)address line to display “<street name> <street number>”, instead of “<street number>, <street name>,”.
I also want to remove the commas after City- and Street-fields.
Thank you for this great plugin!
]]>Hi and thanks for the great plugin. I have a problem with the address fields; they just won’y update the map. I’m using a custom address field (as you can see below), but I did try with the default fields too and it’s still not workin. There are no errors in the console so I’m not sure what could be wrong. My form code is below, I can provide admin access if necessary.
<label> ?sim-Soyisim
[text* your-name] </label>
<label> Email Adresiniz
[email* your-email] </label>
<label> Cep Telefonu Numaran?z
[tel* your-tel] </label>
<label> Lütfen En Güncel Elektrik Faturan?z? Yükleyiniz
[file* fatura limit:9mb filetypes:png|jpeg|jpg] </label>
<label> Sistemin Uygulanaca?? Adres
<p id="line"> [text* your-address placeholder "Adresinizi Giriniz"] </p></label>
<em>Haritanin üzerindeki noktan?n do?ru oldu?una emin olun. De?ilse noktay? do?ru yere ta??y?n..</em>
<p>[map your-location your-address "zoom:6;clat:39.92553299999998;clng:32.86628700000001;lat:39.925533;lng:32.866287"]
<p>[acceptance your_consent]<a href="kvk"
target="popup"
onclick="window.open('https://senerji.istanbul/kvk/','popup','width=600,height=600'); return false;">Ki?isel verilerimin korunmas?n? </a> kabul ediyorum. [/acceptance]</p>
[submit "G?nder"]
<script type="text/javascript">
(function($){
$(document).ready( function(){
$('.cf7-google-map-container.your-location').on('update.cf7-google-map', function(e){
//the event has 5 address fields, e.address.line, e.address.city, e.address.pin, e.address.state, e.address.country.
//some fields may be empty.
$('p#line input').val(e.address.line);
$('p#city input').val(e.address.city);
$('p#pincode input').val(e.address.pin);
})
})
})(jQuery)
</script>
]]>
Hello @aurovrata
I hope you are doing well.
First of all thank you for this amazing plugin.
I have an issue with translating the fields. I add the code you provide but nothing changes. The fields are not translated.
By the way, there are two syntax errors in the code. I don’t read code. Somebody noticed this for me as I got an error when trying to save.
Syntax error 1: The first field is missing a ; at the end of the first line
Syntax error 2: The fourth field is missing a ; at the end of the fourth line.
This is the code I am talking about (For translating the fields)
add_filter(‘cf7_google_map_address_label’, ‘change_address_label’,10,2)
function change_address_label($label, $field_name){
if(‘your-location’==$field_name){
$label = ‘Adresse’;
}
return $label;
}
add_filter(‘cf7_google_map_city_label’, ‘change_city_label’,10,2)
function change_city_label($label, $field_name){
if(‘your-location’==$field_name){
$label = ‘Ville’;
}
return $label;
}
add_filter(‘cf7_google_map_pincode_label’, ‘change_pincode_label’,10,2)
function change_pincode_label($label, $field_name){
if(‘your-location’==$field_name){
$label = ‘Code postal’;
}
return $label;
}
add_filter(‘cf7_google_map_country_label’, ‘change_country_label’,10,2)
function change_country_label($label, $field_name){
if(‘your-location’==$field_name){
$label = ‘Pays’
}
return $label;
}`
But regardless of this, it still does not translate the fields. Nothing happens in the front-end.
Thank you in advance
Vassos
]]>Once again, great plugin! ??
1.I see on desktop when using the search bar one has to select the address twice. I.e. click once on the auto suggestion, then click again before it fills in the address info. I’m pretty sure it didn’t use to do this on previous versions as I’ve been using this plugin for a while now. Not sure when it started though. Could you please check?
2. Search bar does not work on mobile. Could you please look into this?
Thank you ??
]]>Does the map suppose to update when you fill in the 4 address fields?
]]>