• Resolved marpessa1

    (@marpessa1)


    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>
Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    There are no errors in the console

    what are they? Can you post them here

    Thread Starter marpessa1

    (@marpessa1)

    There is nothing in the console. You can see it yourself here, I’ve actually added the link to the original post. https://senerji.istanbul/solar-teklif-formu/

    Plugin Author Aurovrata Venet

    (@aurovrata)

    you’re using a custom address field, therefore you need to implement your own script to update your field using the marker update event, see FAQ #5

    Thread Starter marpessa1

    (@marpessa1)

    I did that. My code is as follows but it’s not working. The script code is part of the contact form, should I implement it to the header for it to work?

    <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);
           })
         })
       })(jQuery)
     </script>
    Plugin Author Aurovrata Venet

    (@aurovrata)

    it works for me when the marker is placed on a location when google finds an address:

    image

    Thread Starter marpessa1

    (@marpessa1)

    Hmm, is that how it works? I thought it would work vice-versa. I’d type an address and it’d update the map, no?

    Thread Starter marpessa1

    (@marpessa1)

    Nevermind, I’ve fixed it.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I’d type an address and it’d update the map, no?

    that’s what the search button does on the map itself (icon with the little magnifying glass).

    @marpessa1
    I am having the exact same issue. Do you mind sharing how you were able to fix yours?

    Plugin Author Aurovrata Venet

    (@aurovrata)

    @micki do you not see the search button with the magnifying glass icon on your map?

    Thread Starter marpessa1

    (@marpessa1)

    @micki I ended up switching to another plugin.

    @marpessa1, I do also have the same issue and saw on your site how nicely you’ve implemented the Google address finder which then hands over location data to the map. I am trying to implement exactly the same. May you please tell me, how you were solving it?

    Thread Starter marpessa1

    (@marpessa1)

    @klasphilipp I ended up using the CF7 Google Maps plugin, I couldn’t get this one to work the way we needed.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    The search field for an address already exists on the map, however in some themes the search icon is disappears behind the map. The search icon opens a text field which allows you to type an address, select it from the list of suggestions google map returns and see a marker being placed on the map.

    @marpessa1 Thanks for letting me know about it. I’ve just found and outdated one at https://codecanyon.net/. Can you share where I can purchase it? Thank you!

    @aurovrata Also many thanks for guiding me further. I just realized that I have to activate “search bar” in settings to be able to have the address form field running. The search field lays over buttons on the map, which doesn’t look nice. Do you have a tip for me how I can custom the look & feel? Thanks as well!

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Address field not updating map’ is closed to new replies.