Your address will show here +12 34 56 78

Home Forums WP RESIDENCE – Real Estate WordPress Theme FORUM Change the auto-complete address rules for different Fields – starting v 1.07

This topic contains 3 replies, has 4 voices, and was last updated by  mitchoo 2 years, 3 months ago.

  • Author
  • #100854


    Google maps address details are assigned to auto-complete in a JS file.

    Documentation – 

    Google documentation moved to

    and for the types used

    If you are confident to modify the fields, you can edit the assignment of the fields in FILE:


    Default code:

    function fillInAddress(place) {
            for (var i = 0; i < place.address_components.length; i++) {
              var addressType = place.address_components[i].types[0];
                var temp='';
                var val = place.address_components[i][componentForm[addressType]];
                if(addressType=== 'street_number' || addressType=== 'route'){
                  //  document.getElementById('property_address').value =  document.getElementById('property_address').value +', '+ val;
                }else if(addressType=== 'neighborhood'){
                }else if(addressType=== 'postal_code_prefix'){
                   // temp = $('#property_zip').val();
                }else if(addressType=== 'postal_code'){
                   // temp = $('#property_zip').val();
                }else if(addressType=== 'administrative_area_level_2'){
                }else if(addressType=== 'administrative_area_level_1'){
                }else if(addressType=== 'locality'){
                }else if(addressType=== 'country'){
    • This topic was modified 2 years, 10 months ago by  Anna.
    • This topic was modified 2 years, 6 months ago by  Anna.
    • This topic was modified 2 years, 1 month ago by  Anna.
  • #103769


    Sorry, Anna!
    This code is designed to address are automatically clipped to the street?
    Could you write this code again in the tag /CODE

  • #104332


    Can you tell me what type is use for kelvin heights?

    like peninsula = street address

    queenstown = city address

    9300 = postal code

    New Nealand = country

    kelvin heights = ?

    because i used neighbourhood, sublocality, and so on but nothing get the kelvin heights from address, though everything else is getting like country, locality/city, postal code, and so on.

  • #110111


    Google documentation moved to

    and for the types used

    • This reply was modified 2 years, 3 months ago by  mitchoo.

You must be logged in to reply to this topic.