Support

Home Forums Event Espresso Premium Question identifier

Question identifier

Posted: February 13, 2014 at 9:18 am


Daniele Pavinato

February 13, 2014 at 9:18 am

Hi,

I asked this some time ago, but I need to ask you this.

I want to have a unique identifier for every question. I won’t the ID because it makes confusion.

When I create a new question, I see that is possible to insert a ‘Required text’ and I want to use it as unique identifier.

In the new_group.php I inserted the $questions->required_text aside the stripslashes($question->question) and it works fine. The same when I display all questions. So, when I insert a text on the “Required text” field, in the questions list and during the group questions creation, I can see it aside the question name.

My problem is when I want to edit a group questions, because in the edit_group.php the function espresso_get_user_questions_for_group() doesn’t retrive the $question->required_text.

I ask to you how can I retrieve that value.

Does it make sense?


Sidney Harrell

February 13, 2014 at 1:44 pm

Place a pluggable function wrapper around the function espresso_get_user_questions_for_group in core:

if (!function_exists('espresso_get_user_questions_for_group')) {
{
...
}

then make a copy of it, place it in uploads/espresso/custom_functions.php, modify it to retrieve that value.
Please be aware that we do not recommend modifications to core files and we cannot offer support if you chose to do such modifications. Because it makes updating difficult, if you make it so that you cannot update, you may suffer from bugs that we have fixed in the current version. Therefore, it is recommended that if you do make core modifications that you do so in such a way that you will be able to upgrade. Instead of modifying a function directly in plugins/event-espresso, if it does not have a pluggable function wrapper, add one. That way you can update and all you have to do after an update is add your pluggable function wrappers back into core.

The support post ‘Question identifier’ 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