Skip to:
Content
Pages
Categories
Search
Top
Bottom

Is it possible to display the location in several fields?

  • I’m using BuddyPress last version on BuddyPress default theme on WordPress 3.2.1. and no blog.

    In the location field, i’d like to have several subfields:
    - street name & number
    - zip code
    - city
    - country (mostly for this one, since my users are all located in the same city, most of them tend to forget to mention the country name – without which the Google Map generation is impossible).

    Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @crotin Are you sure about needing the country name? Google works pretty well even using locations like “near new york”. Even just a street number and street seem to return locations for me depending on how common the street. I added a profile field description stating that they had to fill in a complete address (street, city, state, zip) in order for the map to display). If they don’t follow directions, what else can you do?

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    As inhouse says google is pretty good at picking up a location from mixed strings, if you added only one field but asked that users entered a comma separated address that will work fine or should.

    I toyed with the idea of providing for extra fields but things become increasingly complex as have no idea what they may be and have to fetch all xprofile fields and do some sort of looping over them or the user would have to state what fields existed then the plugin would have to grab the field data from each turn it into an array and produce a usuable string from that to feed to google.

    It’s something that I’m vaguely considering an approach to in the future but it’s not a pressing matter, but have considered sites which already ask users for location profile data in multiple fields and in those instances that data ought to be used.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.