1

I'm trying to figure out how I can set public-facing proximity searches in 4.7.25 to default to civiCRM's default country?

Currently, the user is required to select a country and state, but 99% of our searches happen within the same country.

is there a way to set this?

1

The profile search fields respect the system-wide default country. To set the default country:

  • Administer menu » Localization » Languages, Currency, Location.
  • Default Country is located about halfway down the page.

Screenshot: enter image description here

  • I'm running v4.7.3 on Joomla 3.8.6, and while I have Default Country selected, when I provide a public link to a profile which allows for Proximity search, the Country dropdown does not default to the Default Country. see : cahpi.ca/… – A. Block Mar 27 '18 at 20:36
  • Ah, you're correct. The default country is respected on "create" but not on search. You may want to file a bug report on this, but given limited resources you may need to submit a fix yourself or hire someone! I imagine that you're not the first person to find this, but it's not worth it to fund a fix. – Jon G - Megaphone Tech Mar 27 '18 at 21:11
0

I recently came across the same problem myself - for country, not for state - so I wrote an extension (com.megaphonetech.defaultcountrysearch) to automatically set the default country on profile search forms when such a field exists. You can download it here. It should be reasonably easy to add support for a default state as well!

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.