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

artatac’s picture

I had the same issue and added the following to my css file

#edit-distance-latitude-wrapper, #edit-distance-longitude-wrapper {
	display: block !important;
}

see http://94.3.203.213/upforsale02/propertyprox2

where in the uk are you based?

regards

Joe

yesct’s picture

sjf’s picture

I should have known that... Works great. Thanks.

yesct’s picture

Status: Active » Postponed (maintainer needs more info)

is there a fix/patch to location needed?

sjf’s picture

Probably, 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

exobuzz’s picture

I can tell you that code is generated from some javascript. There is a reference to jquery and the postcode field. Related ?

yesct’s picture

yrre7’s picture

I 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?

yrre7’s picture

nevermind...I just cleared my cache and now it works.
Thanks

yesct’s picture

is there a css file that comes with location that can be patched adding important to the three ... -wrapper thingies?

leenwebb’s picture

The 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?

yesct’s picture

TC44’s picture

I'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).

socialnicheguru’s picture

This 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

toemaz’s picture

#14 works for me but it's indeed not fixing the root of the problem.

yesct’s picture

Status: Postponed (maintainer needs more info) » Active
Issue tags: +Location theming, +location useful code

I 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. :)

ankur’s picture

Status: Active » Needs work

I believe we need a patch if this is still an issue.

legolasbo’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Closing old D6 issues as D6 is end of life