2

Is it possible to build a search form in FormBuilder that allows for Address Proximity search? If so, what am I missing to make it work?

When building a search form with FormBuilder, I see that "Address Proximity" is available as a field to be added to the form. However, I can't seem to make it work as an actual search criteria. Here's what I'm doing:

First I add the field to the form in the builder: Form builder: insert the field

It's odd that it appears as a label with no field, and perhaps more odd that the settings for this field show a blank value for Type: enter image description here

(I've tried specifying each of the various Type options, such as Select, Checkbox, etc., but none of them result in form fields that would be useful for proximity searching.)

I save that form and open the page, and still I see just the label with no field (or else some useless-in-this-context field such as a yes/no select, etc., depending on the Type option I manually specified): enter image description here

For what it's worth, I have verified that geocoding (via Google) is working fine on this site.

2
  • What is the base table for your search? I haven't tested but it's possible the base table needs to be address, and then you can join in other things.
    – Demerit
    Dec 29, 2022 at 22:26
  • @Demerit Base table is Contact (with Address joined if primary) in the example above, but I just tried now and the behavior is the same when base table is Address (with or without Contact joined).
    – TwoMice
    Dec 29, 2022 at 22:47

1 Answer 1

2

The proximity filter uses a specialized field type which hadn't been defined in Afform.

I've posted a Pull-Request to fix this: https://github.com/civicrm/civicrm-core/pull/27631 (should be included in the CiviCRM 5.67 release).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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