Hello,
Thanks for this module, it's really usefull. I hope you don't mind me asking for a new feature but I have been trying to get my head around this for two days now and I'm stuck.
I want to create a view that lists all the nodes that have used the address field.
This works great.
I would like now to create and exposed filter that allows the user to filter the results by "country".
As it is I get the possibility of using a "text field" search query that takes the two letter ISO code for the countries.
Is it possible to have a select list on the country field for the exposed filter?
I've been looking at the code and I suppose that what is needed is to be able to hook the function _addressfield_country_options_list() function into the view filter... but i haven't go the faintest idea of where to begin.
Comments
Comment #1
apprentia commentedI'm still trying to get this to work. I don't have the coding credentiels to really understand what's happening there... Is there anyone who can point me in the right direction?
Comment #2
manu manuAlas I don't think it's possible out of the box right now.
Looking at a similar module, Location, there is a bunch of views related files and specifically location_handler_filter_location_country.inc witch constructs a select. Address Field doesn't have such views integration.
I don't know is this feature is planned...
This issue seems similar: #991834: Address component Views support
Comment #3
elly commentedI am in need of this too. Any news or thoughts from the maintainers on this? I can't bear the thought of going back to location.module for this functionality. I like where addressfield is going and have it working great with an openlayers map & geofield!
Comment #4
damien tournoud commentedThis has been implemented in #0570b0d!
Comment #5
elly commentedWait. Should I be seeing the fix in alpha 4? I just updated and still don't see country filter select lists available in views?
Comment #6
damien tournoud commentedNope, it's only in the -dev currently. Should make it to the release today.
Comment #8
emptyvoid commentedChuckle, looks like it never got into an official release. :(
So it looks like there isn't standard functions to generate administrative_area values either, let alone expose it as a filter in Views.
Comment #9
dshields commentedUsing the same concept for administrative area would have tremendous value as well
Comment #10
stewart.adam commentedI would appreciate this as well, it would be very great to have a drop-down selection of states/provinces, even better if it has an option to limit the possibly options to the ones available in the query results.Edit: Sorry, posted this to the wrong tab. Was supposed to go to the corresponding issue for administrative area.