Posted: May 28, 2023 at 6:07 pm
I am trying to make it so that if we do a registrant search by company name, that I get a list of all registrants with that company. How can I make the registrant search field querey things in the registant’s answer fields? It looks like it only will search name, id# etc that are shown in the preview. |
|
The search does not query the answers to custom fields because the system doesn’t know what those questions would be. The easiest thing to do is download the list of attendees and sort or search from a spreadsheet program. |
|
I realize that downloading a spreadsheet is a way to find that data, but this is not an acceptable alternative for the client. They want to be able to find all registrants from a given company or year using the search function. Is there a way to add this via custom script or function? Do you know anyone who has done a customization like this? |
|
Hi there, We have literally thousands of hooks within Event Espresso so the answer to most questions asking if something is possible is yes, but that doesn’t also mean easily 😉 There is a filter for the WHERE conditions used on the registrations query:
That is passed both the current where_params and requestParams which can allow you to change this to look for answers to specific questions. I’m not aware of anyone doing this specific feature so far but you can find some examples of using that filter here: You’ll need to understand how our model system works for this: https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System Specifically how the modal query params work: |
|
I found this in the thread – could this method be used to query the fields in the registrants? |
|
I used this code “as is” in my functions file and it works. Now if I put in a company name i get a result. |
|
The support post ‘Search Registrant Fields’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.