In Views, if you create a Location:Distance/Proximity Filter and expose it, you get two boxes - one for postcode (or lat/long), and the other for entering the distance in miles. This works fine.
However, if you put the exposed filter in a block (using the standard "Exposed form in block: Yes" option in Views), the Postcode field disappears, leaving only the distance field. Checking in Firebug, this seems to be a style issue but one that isn't generated by my CSS:
element.style {
display:none;
}
Is this being generated by location.module?
Comments
Comment #1
artatac commentedI had the same issue and added the following to my css file
see http://94.3.203.213/upforsale02/propertyprox2
where in the uk are you based?
regards
Joe
Comment #2
yesct commentedtagging
Comment #3
sjf commentedI should have known that... Works great. Thanks.
Comment #4
yesct commentedis there a fix/patch to location needed?
Comment #5
sjf commentedProbably, but I couldn't find the file responsible for generating the element.style{display:none;} for #edit-distance-latitude-wrapper and #edit-distance-longitude-wrapper
Comment #6
exobuzz commentedI can tell you that code is generated from some javascript. There is a reference to jquery and the postcode field. Related ?
Comment #7
yesct commented#470666: In exposed filter block, "Postal code" filter disappears after hitting "apply" was marked as a duplicate of this issue
Comment #8
yrre7 commentedI added #edit-distance-postal-code-wrapper into my css with the above code, and it doesn't work for postal code search...It gets hidden..
any idea?
Comment #9
yrre7 commentednevermind...I just cleared my cache and now it works.
Thanks
Comment #10
yesct commentedis there a css file that comes with location that can be patched adding important to the three ... -wrapper thingies?
Comment #11
leenwebb commentedThe CSS hack (besides being just that) stopped working for me after I applied a bunch of other styles to my site.
Does anyone know a real fix to this? I am totally js-ignorant so I don't even know where to start looking. Though... it looks like #493266: Problem with exposed date filter display is a different flavor of the same problem? So maybe the problem lies somewhere up the food chain?
Comment #12
yesct commentedmarked #463048: Zip or Zip/Country, or City disappear in exposed filter as a duplicate of this issue.
Comment #13
TC44 commentedI've noticed a couple of strange things with this today, maybe someone can confirm this..
If you have any additional exposed filter for a cck field with a "one of" operator (displaying a select list), the postalcode filed disappears. I've checked this a half dozen times, removing the filter and putting it back, and the same result each time.
Secondly, if you expose the view as a block, postalcode field is gone. But if you set it back to "no" for exposed as block, and you still have your block enabled on your views page, the form will then show up twice on the page (once along the top as normal, and once where the block is (even though expose as block has been disabled).The odd thing is that In the block form, postalcode is there, but not in the normal form at the top.
Can anyone confirm this? Also the css code didn't work in my case for views exposed as blocks, but it seems to work for allowing the additional exposed droplist filters in the regular view play nice with the locations postalcode/zip field..
** update - scratch the last remark, the css code does work great for views blocks for me also. (Since I'm using zip/postal not lat/long, the id name was different and I missed it).
Comment #14
socialnicheguru commentedThis worked for me.
#edit-distance-latitude-wrapper,
#edit-distance-longitude-wrapper,
#edit-distance-postal-code-wrapper,
#edit-distance-country-wrapper
{
display: inline !important;
}
display: block !important did not.
I don't really understand the difference between
display: inline !important; vs
display: block !important
Comment #15
toemaz commented#14 works for me but it's indeed not fixing the root of the problem.
Comment #16
yesct commentedI guess we need someone to look at the code and figure out which file to put the css in. then make a patch.
Maybe try going in to #drupal or #drupal-support and saying
"hi. I want to make by first patch. where do I look in the code for a contrib module to find where to add the css I need to to fix a problem?" ...
making a patch
http://drupal.org/patch/create
irc
http://drupal.org/irc
usually people in irc like to help new people become the kind of people who can patch stuff. :)
Comment #17
ankur commentedI believe we need a patch if this is still an issue.
Comment #18
legolasboClosing old D6 issues as D6 is end of life