Support

Home Forums Event Espresso Premium Search Registrant Fields

Search Registrant Fields

Posted: May 28, 2023 at 6:07 pm


WalkerDesigner

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.


Garth

  • Support Staff

May 29, 2023 at 8:34 pm

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.


WalkerDesigner

May 30, 2023 at 8:39 am

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?


Tony

  • Support Staff

May 31, 2023 at 8:50 am

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:

FHEE__Registrations_Admin_Page___get_where_conditions_for_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:

https://gist.github.com/search?q=FHEE__Registrations_Admin_Page___get_where_conditions_for_registrations_query

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:

https://github.com/eventespresso/event-espresso-core/blob/master/docs/G–Model-System/model-query-params.md


WalkerDesigner

June 4, 2023 at 4:42 pm

I found this in the thread – could this method be used to query the fields in the registrants?

https://eventespresso.com/topic/registration-search-query/


WalkerDesigner

June 4, 2023 at 4:55 pm

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.

https://github.com/eventespresso/ee-code-snippet-library/blob/master/admin/jf_ee_add_answers_to_registration_search.php

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.

Event Espresso