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.
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.
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:
<?php
/*
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
add_filter(
‘FHEE__Registrations_Admin_Page___get_where_conditions_for_registrations_query’,
‘my_custom_search_field_reg’,
10,
2
);
function my_custom_search_field_reg( $where, $request ) {
if (isset($request[‘s’])) {
$search_string = ‘%’ . sanitize_text_field($request[‘s’]) . ‘%’;
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.
Viewing 3 reply threads
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.