City and country fields as autocomplete in user profile for a social networking site

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by madhums on May 12, 2010 at 3:52am

Hi,

I am trying to have auto complete for countries, cities fields in user profile. But I am not able to find a proper way to do it.

I tried address module, but it doesn't have auto complete option. Even tried Location module, but its too heavy and redundant for my purpose. I tried hierarchical_select module, but it doesn't provide a CCK field type...

any suggestions?

Thank you.

Comments

Hierarchical select can be

Posted by johngriffin on May 12, 2010 at 9:00am

Hierarchical select can be used with content taxonomy, so effectively it can populate a cck field.

John Griffin
http://atchai.com

@mudhums I'm in the exact

Posted by drupalina on October 13, 2010 at 8:42pm

@mudhums
I'm in the exact same situation as you are: I desperately need Hierarchical select with autocomplete functionality for contnet profile fields. Did you manage to find a solution?

Subscribing !

Posted by Roze-1 on February 21, 2011 at 7:32am

Subscribing !

hopefully you guys have found

Posted by smira on April 12, 2011 at 6:44pm

hopefully you guys have found a solution by now. if you haven't follow instructions
http://drupal.org/node/63904

if you are creating a social networking type of site you are likely using the content profile module http://drupal.org/project/content_profile

you can that create an autocomplete field from the list of countries...

i hope this helped,
-have fun

These solutions are very much

Posted by alexmc on February 29, 2012 at 3:42pm

These solutions are very much Drupal 6 or earlier solutions. None seem to use Profile2 - the main way of doing this in Drupal 7. Can anyone point me at a similar solution for D7? Thanks

Independent select list

Posted by Energyblazar on February 29, 2012 at 4:22pm

Go to D7 Config > People > Account Settings > Manage Fields

Add field > List (text) > Select List in that add -> http://www.textfixer.com/resources/dropdowns/country-list-iso-codes.txt

question

Posted by ana.bapz on April 8, 2012 at 1:36pm

hi
i am new on the community i am using drupal for a student project and i am creating a website about how find a specific shop in countries all arround the world so i need in order to have that, i need to create two or three fields : countries, area, and cities, that will be the criteria to find the according place in the database
so i wonder if ur solution could be for me but i am using drupal 7
for the country i found a solution to have a full database i used taxonomy import export and that allowed me to download a full database with all the countries
i ask you help for how i can create that rersearch and how manage to have this full database
thanks in advance

use views

Posted by mossy2100 on April 8, 2012 at 11:15pm

Hi Ana

How are you storing the shop locations? Are you using the addressfield or location module?

I think the best approach for you will be to create a view of shops, and pass the country code as a contextual filter to only show shops for a certain country.

I think there are 2 approaches you could take:
1. Add a taxonomy reference field to your shop content type, and link every shop with a country term. This will avoid coding, but if you already have the shops' countries stored some other way, such as in addressfield or locations, then this solution may be inelegant.

  1. Write a custom filter using Views PHP, that will take the views argument (the country code) and only let pass shops that match. You would write an SQL query to check the country code for a given shop.

HTH
Shaun

Social Networking Sites

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /