The goal is to allow users to enter their location and return all nodes within 10 miles / km.

If the filter is exposed, to allow the user to enter the location, the distance value appears to be exposed by default, and can not be pre configured.

Is this true, and if so, is there any way to configure it so the distance can not be changd by the user?

Thank you.

Comments

kardave’s picture

Try hiding or disabling the distance field with CSS, and if needed, set its value with javascript. I have the very same problem, just trying to find out a working solution for this...

kardave’s picture

Status: Active » Needs review

Okay this works for me now:
Css hide is simple: just add display: none;
Setting the field's value with jQuery:

$(document).ready(function() {
	if($('#edit-hely-value')) {
		$('#edit-hely-value').val('1000');
	}
});

Replace id and number with your values!