By samohtwerdna on
Hello,
I am working on a Drupal site that has a advanced search for doctors based on "zip". The problem is that it will only return an exact match. I need to code it so that it will check for exact matches - then if none found - check for approximate match etc.
does anyone know how to get started with this/ point me in the right direction?
Comments
Do you not have a drop down
Do you not have a drop down box like this? http://www.adoptionagencyratings.com/search/location
That has the distance you want to search.
Discount SSL Certificates http://www.runssl.com
Nope no drop down. I just
Nope no drop down. I just have a place to enter the zip code and a "submit" button.
My situation is a little unique because I have three search forms stacked on top of each other. each has a different focus for searching ( e.g. Search for Doctor; Search for Clinic; Search for therapist )
My client wants some results to come back even if the nearest zip - code is a 50+ miles away.
How did you get the search
How did you get the search by location setup? is that a Drupal module??
Yes it is a Drupal module
Yes it is a Drupal module called Location :-) http://drupal.org/project/location
More details about the site http://drupal.org/node/206397
Discount SSL Certificates http://www.runssl.com
did you have to add an
did you have to add an argument handling code to have the search work?
I saw this code as and example
global $user;
$view->filter[0][value] = $user->location['postal_code'];
But this uses the "users" profile - I want to use the postal code in the views. So what would my $xxxx be?
global $wildcard; //what should this be?
$view->filter[0][value] = $wildcard->location['postal_code'];
Not sure how to set this up.
I do not recall any custom
I do not recall any custom coding. Just installed the Google map modules and location. Did not realise it was even a option until I worked on the site and noticed the search by location option. I installed the module so I could import nodes with addresses from another database.
Discount SSL Certificates http://www.runssl.com