I have a custom field that I want to be searched when a user chooses a custom quicksearch option. I have the autocomplete working with the custom quicksearch option, but I want the behavior of pressing enter to act like the default quicksearch options where the advanced contact search form loads with the user's entered quicksearch text driving the results.
I am currently trying without success to use the buildForm hook to set my custom field value. The issue is that the presence of a default value for a custom field is apparently not enough to cause the additional sql to run which includes the custom fields' joins. I saw that the queryObjects hook might could be of assistance, but I was hoping there was a core BAO query or method that could be invoked to add the necessary joins into the advanced search query which would then work with my custom fields default value.
Does anyone know a way to use buildForm or another hook to programmatically modify the search criteria based on a custom field?
Thanks for any help you can provide.