Jump to:
| Project: | Address Field |
| Version: | 7.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
When I add field in view -> content: store locator address (screenshot 1) and go for global: combine fields filter (exposed) ( screenshot 2 ) and selecting store locator address, whenever I search something in ( postal code, city, thoroughfare ). output is nothing :-(, but if I search something like "US" / "IN" result comes for locations in US or INDIA. when i saw the query I fount it takes only "gsl_addressfield_country" from table "field_data_gsl_addressfield". It should take all the fields like gsl_addressfield_administrative_area, gsl_addressfield_thoroughfare, gsl_addressfield_postal_code. Someone help.
I want to create a view block which will list all of our store locations and will search them by having exposed global combined filter. It should search all stores by the search keywords. ( Search keywords should be searched in ANY column in field_data_gsl_addressfield table.)
Thanks in advance
| Attachment | Size |
|---|---|
| Screenshot 1.png | 171.91 KB |
| Screenshot 2.png | 154.56 KB |
| Screenshot 3.png | 128.88 KB |
Comments
#1
I'm having the same issue trying to setup an exposed views filter that would filter on all (or some) of the address field parts.
Does anyone have a workaround for this ?
Thanx.
#2
This original support request is specifically for using the "Combine fields filter", a feature of Views that I didn't even know existed until now. : P
Looking at the code, that particular filter only works against a single column "real field" of whatever field you've selected. In field.views.inc, we find this code:
<?php$keys = array_keys($field['columns']);
$real_field = reset($keys);
?>
So basically, the default Field integration for Views selects the first column of a multi-column field schema and uses that as the "real field" value, which in turn is used by the "Combine fields filter". This the country code for Address Fields.
If you want to use this functionality with Address Fields, you should search for an existing feature request in the Views issue queue to make this filter work with multi-column fields. If one doesn't exist, feel free to move this one there and re-open it.