I am trying to configure a view that is supposed to show my mapped nodes based on filter criteria set by the users. For example I need the user to be able to select a country and the view should display all nodes from that country. I am adding a filter on the "Location: Country" field and I am exposing it. The problem I am having is that the exposed filter is just a text field.
By trial and error I discovered that if I type Canada, the view will return nothing. But if I type CA, it will give me the nodes from Canada.
Obviously I cannot expect my users to use country codes ;-) So there must be a solution to this:
Either (1) configure the filter to somehow use the full country name or (2) have the filter to be exposed as a drop-down box (instead of plain text box).
Can you help me with that? Which of these are possible?
Comments
Comment #1
kirilius commentedAny ideas?
Comment #2
jasontanner commentedI don't believe what you want is possible at the moment. I think the location views integration is a work-in-progress.
Personally, I'd flag this behaviour as a bug.
Comment #3
kirilius commentedI would think that it is a bug too. Obviously the feature is there but no one would use country codes instead of names.
Comment #4
kirilius commentedBumping this up. Is there any update on this issue?
Comment #5
bdragon commentedWorking on it now.
Comment #6
bdragon commentedOK, implemented.
Thanks for the request.
http://drupal.org/cvs?commit=153454
Comment #7
kirilius commentedThanks, I will try!
Comment #8
kirilius commentedOk, I found the updated files and applied them over my installation of Location.
When I try to create a filter on the Location: Country field, I get the following message:
Comment #9
bdragon commentedOK, I think this might help..
http://drupal.org/cvs?commit=153499
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/location/ha...
Comment #10
jasontanner commentedAny chance of modifying the theming so that the dropdown does not go outside the containing filter block div ?
Also, would this be an opportune time to include the possibility of a region selector (e.g. EUrope, Middle East, Africa, Americas etc ...)
And finally, being able to have a filter (autocomplete or dropdown) on the city selector that uses the selected country to select from the towns in the locations tables would be nice.
Comment #11
kirilius commentedThanks, that did it!