Answers.Body: <p>The proximity filter uses a specialized field type which hadn't been defined in Afform.</p>
  <p>I've posted a Pull-Request to fix this: <a href="https://github.com/civicrm/civicrm-core/pull/27631" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/27631</a> (should be included in the CiviCRM 5.67 release).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-25T17:23:24.650Z
Answers.LastActivityDate: 2023-09-25T17:23:24.650Z
Answers.UserDisplayName: Coleman
Body: <p>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?</p>
  <p>When building a search form with FormBuilder, I see that &quot;Address Proximity&quot; 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:</p>
  <p>First I add the field to the form in the builder:
  <a href="https://i.sstatic.net/4IhZI.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4IhZI.png" alt="Form builder: insert the field" /></a></p>
  <p>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:
  <a href="https://i.sstatic.net/pX6vU.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/pX6vU.png" alt="enter image description here" /></a></p>
  <p>(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.)</p>
  <p>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):
  <a href="https://i.sstatic.net/BlLRJ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BlLRJ.png" alt="enter image description here" /></a></p>
  <p>For what it's worth, I have verified that geocoding (via Google) is working fine on this site.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-29T22:26:54.683Z
Comments.Text: 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.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-29T22:47:59.193Z
Comments.Text: @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).
Comments.UserDisplayName: TwoMice
Tags: <formbuilder>
Title: How can I use Address Proximity as a search critieria in FormBuilder?
ThreadText: # How can I use Address Proximity as a search critieria in FormBuilder?
  
  (Asked by: username_0 on 2022-12-29)
  
  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](https://i.sstatic.net/4IhZI.png)](https://i.sstatic.net/4IhZI.png)
  
  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](https://i.sstatic.net/pX6vU.png)](https://i.sstatic.net/pX6vU.png)
  
  (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](https://i.sstatic.net/BlLRJ.png)](https://i.sstatic.net/BlLRJ.png)
  
  For what it's worth, I have verified that geocoding (via Google) is working fine on this site.
  
  **Tags:** formbuilder
  
  > **Comments:**
  > **username_1**: 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.  
  > **username_0**: @username_1 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).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-09-25. Score: 2 | Accepted answer
  
  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).
  
  
  ---
  
  