Location Validation when adding a new listing

This topic contains 11 replies, has 4 voices, and was last updated by  Andrea Piaggesi 7 years, 10 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #393665

    Andrea Piaggesi
    Expired Member
    Post count: 42

    Hi,
    I’ve tried to search the forum but I’ve not found a reply to this question.
    Is it possibile to restrict the location field in the listing form to Google only?
    So when a user will add a new listing, the form should permit to search and select the location and deny any arbitrary text that don’t match any proposed location from google.

    I would like to get only Google verified locations in my database.

    Thanks!
    Andrea

    #393669

    Kor
    Moderator
    Post count: 16516

    Hi Andrea,

    Please share the URL of the site in question so we can take a better look at it and also WP temp admin access to your site. You can post the details here using the private reply option below.

    #393792

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    currently that is not possible, but I asked to the developers to check if there is a workaround.

    Thanks

    #393817

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I can’t think of a super easy way to do this. If you can explain the idea more maybe i can think of something? Is it just addresses you are worried about?

    Stiofan

    #393837

    Andrea Piaggesi
    Expired Member
    Post count: 42

    Hi,
    sorry for the delay.
    I’ve hided region and city because when the user click on the location suggestion these fields are automatically updated.

    I think that the Google suggestion are perfect for me so I would like to limit the location scope to Google results only.

    By doing this I’ll be sure that region and country will be autocompleted so I can safely hide them.

    Many thank for all the help guys.
    Andrea

    #393838

    Andrea Piaggesi
    Expired Member
    Post count: 42
    This reply has been marked as private.
    #393909

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Basically you just dont want them changing the region/city manually? If so then should it not work like that already if you hide them? The GPS info will not be filled in unless they select the google address or they drag the map.

    Stiofan

    #393912

    Andrea Piaggesi
    Expired Member
    Post count: 42

    Yess it works in this way but if somebody write an address that does not match a google address or location Region and City get the default values.

    So the map will get a wrong point.

    Basically I have to disable Region and City (don’t ask me why…it’s a long story), by hiding them I would like to lock the Location from the user on only google results.

    Anyway I’ve got a lot of support here, so don’t drive you mad, if you can find a quick workaround ok otherwise I think it’ll be fine.

    Thanks!
    Andrea

    #393922

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    so maybe the solution is to blank the gps info or the city info on page load if the post is new, depending on what error message you want to show.

    Stiofan

    #393937

    Andrea Piaggesi
    Expired Member
    Post count: 42

    Yess good idea, I’ll blank them and write something about picking the location from the Google list.

    These fields can be only mandatory right?

    Thanks!
    Andrea

    #393944

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    yes they are required.

    #394483

    Andrea Piaggesi
    Expired Member
    Post count: 42

    Thanks guys and sorry for the delay.
    I’ll try to blank the hided fields and I’ll manage error messages by jQuery.

    For now it’s working 😉
    Thanks guys!!

Viewing 12 posts - 1 through 12 (of 12 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