Home Forums Event Espresso Premium Run a report on a registration question

Run a report on a registration question

Posted: June 11, 2019 at 8:36 am


June 11, 2019 at 8:36 am

How can I run a report of a question in my registration? For example I have a question were you referred? Wanting to know how many new people were referred.


  • Support Staff

June 11, 2019 at 10:06 am

This is possible, although if the answer to the question is either Yes or No, you may end up with mixed results in the search.

Here’s how to add the feature:

1) Add the following code snippet to a site specific plugin:

Not sure how to add a site specific plugin? You follow this guide:

2) Then, ideally your question’s answer should be something like Yes I was referred

Then with that code in place, you can go to Event Espresso > Registrations and type Yes I was referred into the search field and the search will return a list of results that match.


June 13, 2019 at 9:50 am

Question I have is a Yes No then a text field:
Are you a first time attendee*
Yes No
If referred, who referred you
(text field)

What would I use for a search query?

This is the code I put into the plug in:
Plugin Name: EEA Search
Description: Form Search
//* Please do NOT include the opening php tag, except of course if you’re starting with a blank file
function my_custom_search_field_reg( $where, $request ) {
if (isset($request[‘s’])) {
$search_string = ‘%’ . sanitize_text_field($request[‘s’]) . ‘%’;


  • Support Staff

June 13, 2019 at 10:01 am

You could do a search for “Yes”, but your search results will not be very good if other questions on your registration form are Yes/No questions.

That’s why I recommend changing the answer to “Yes I was referred”.

With regards to the code, if the code in the above reply was everything, then you’re missing lines 13-16 from the example.

The support post ‘Run a report on a registration question’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 3 months ago ago

Topic Tags


This topic is: resolved
Do NOT follow this link or you will be banned from the site!