0

I've made a view with geofield proximity search. The user needs to fill in a location before I want to show result. So I made the exposed filter required: geofield proximity settings

But the view gives result, even when nothing is filled in. This is the query created:

SELECT node.title AS node_title, node.nid AS nid, node.language AS node_language, 'node' AS field_data_field_adres_node_entity_type, 'node' AS field_data_field_location_node_entity_type
FROM 
{node} node
LEFT JOIN {field_data_field_location} field_data_field_location ON node.nid = field_data_field_location.entity_id AND (field_data_field_location.entity_type = 'node' AND field_data_field_location.deleted = '0')
WHERE (( (node.status = '1') AND (node.type IN  ('dealer')) ))
LIMIT 2 OFFSET 0

How can I make sure the query doesn't run if nothing is filled in?

1

Hope you are using Better exposed filter module and configured as this image. enter image description here

|improve this answer|||||
  • Thank you for your answer. I can't test it at this time because there is a (very small) workaround in place. If anyone else can confirm, I'll gladly accept the answer. – Maarten De Block Feb 22 '15 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.