Front end form, address (location) doesn't change …

This topic contains 8 replies, has 4 voices, and was last updated by  Nigel Hancock 5 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: , , ,

  • Author
    Posts
  • #514379

    Nigel Hancock
    Expired Member
    Post count: 83

    Easier to show than tell but on the front end form adding a listing, basically, if you enter an address manually and then move the pin on the map, the first line address field doesn’t update but others (region, city & postcode) do. Any suggestions?

    Video on YouTube at https://youtu.be/mWV6RzR0CB4

    #514396

    Kor
    Moderator
    Post count: 16516

    Hi Nigel Hancock,

    Thanks for your post. Does it work correctly if you insert your listing in the WP backend?

    #514398

    Nigel Hancock
    Expired Member
    Post count: 83

    Exactly the same issue on the backend.

    #514458

    Alex Rollin
    Moderator
    Post count: 27815

    There is a setting in the Location Manager Options to disable the update of the address when the map/pin is moved.

    It doesn’t look like you have that set, though. It is almost like the address is locking on purpose, but I have asked the developers to weigh in on the issue.

    In case they need to take a look please post WP Admin credentials in a private reply.

    Thanks

    #514525

    Nigel Hancock
    Expired Member
    Post count: 83
    This reply has been marked as private.
    #514779

    Kiran
    Moderator
    Post count: 7069

    Hi Nigel,

    This is not an issue but a default behavior. We have set one feature to preventing change value in address field once user typed/keypress in that field.
    In some cases user wants to set own address street but wants to set lat/lon, city, region from map move. So in this case if we do not prevent changing address then it will loose address street set by user again and user needs to type again.

    If you want to change address then just clear that field and move pin on map.

    Let us know.

    Regards,
    Kiran

    #514781

    Nigel Hancock
    Expired Member
    Post count: 83

    I figured that was the case Kiran but needed to confirm. It makes no sense though because while manually inputting the first line of the address and then moving the pin the zip code changes which makes the address invalid. We have beta testers working on our site right now and 2 out of 5 of them reported this behaviour.

    #514923

    Kiran
    Moderator
    Post count: 7069

    Hi Nigel,

    Use following PHP snippet if you want to always update address field even after manually set by user.

    
    
    /**
     * Force to update address on map pin move, even address manually set by user.
     */
    function gd_snippet_191026_add_listing_geocode_js_vars() {
    ?>
    user_address = false;
    <?php
    }
    add_action( 'geodir_add_listing_geocode_js_vars', 'gd_snippet_191026_add_listing_geocode_js_vars', 11 );

    Regards,
    Kiran

    #515017

    Nigel Hancock
    Expired Member
    Post count: 83

    Thanks Kiran, that’s very helpful. At least we have the option now.

Viewing 9 posts - 1 through 9 (of 9 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount