Support

Home Forums Event Espresso Premium More than one questions group

More than one questions group

Posted: January 29, 2014 at 3:01 am

Viewing 12 reply threads


Daniele Pavinato

January 29, 2014 at 3:01 am

Hi,

I need to have more than one questions group, but with the same name because my client needs to modify some questions group for every event.

Any suggestion?


Garth

  • Support Staff

January 29, 2014 at 12:51 pm

HI Daniele,

How are you today?

I’m not sure if I understand your situation. Can you give us more detail?

I’d recommend using question names that are unique so you can determine which group is selected when you configure an event. However, you don’t have to show the question group title or description in the registration form if you don’t want to confuse people. See here: http://www.screencast.com/t/A5409BZEXEy

Does that help?


Daniele Pavinato

February 5, 2014 at 7:36 am

Fine, thanks.

I know that.
My need is to be able to have more than one questions with the same name (i.e. ‘Product -> TEXT’, ‘Product -> MULTICHECK’ ), but recognizable when I need to allocate it inside to a group questions.
My client needs to be able to have different questions for every event, but with the same name.
What I do is to not display the group questions name, so, in this way, I can differentiate what group questions name to choose (in the admin), but I MUST display the name of the querstion…

Is that clearer?
Have you any suggestion?

Thanks


Garth

  • Support Staff

February 5, 2014 at 2:39 pm

If you’re trying to differentiate between similarly named questions I have two general suggestions:

1) Add a character to the name of the question e.g. “t” to signify a text type question: “Product(t)” or “Product*”. This is the most simple way.
2) You can look at the source code of the page and identify the question ID which can help you select the correct question:

<input type="checkbox" name="question_id[]" value="131" id="question_id_131">

I don’t have any other suggestions that don’t involve changing EE3 core.


Daniele Pavinato

February 6, 2014 at 2:01 am

In what page I have to look?


Josh

  • Support Staff

February 6, 2014 at 11:27 am

I think Garth is referring to viewing the source of the edit_group and/or the add new_group admin pages.

Alternatively you could modify the core code to include the question ID in the question group manager. One example would be to change line 126 of includes/form-builder/groups/edit_group.php so it reads:

echo '<li><label><input ' . $checked . ' type="checkbox" name="question_id[' . $question->id . ']" value="' . $question->id . '" id="question_id_' . $question->id . '" />' . stripslashes($question->question) . ' - ' . $question->id . '</label></li>';

This idean has its downsides because the question ID may not be recognizable enough for your client, and it requires a core code modification, which will not be fun to maintain.

I like Garth’s first option, and you could make the question label indication invisible to the end user by entering the question as:

Product <span class="hidden-note">- TEXT</span>
Product <span class="hidden-note">- MULTICHECK</span>

Then you hide the note on the front end with a bit of CSS:

.hidden-note {
display:none;
}


Daniele Pavinato

February 6, 2014 at 3:38 pm

Two questions:

1) Do my client do this?
2) Do I have to inserti this trick in the question title text box?


Daniele Pavinato

February 6, 2014 at 4:41 pm

Update: It would be interesting if it was possible to use the “required_text” field aside to the $question->question inside the edit_group.php with the <span ...>[required_text]</span>


Josh

  • Support Staff

February 7, 2014 at 8:53 am

That’s entirely up to you Daniele.


Daniele Pavinato

February 7, 2014 at 10:26 am

I’m not sure if I understood right what do you mean…


Josh

  • Support Staff

February 7, 2014 at 10:51 am

I’ll try to clarify then:

> 1) Do my client do this?

Either you or you client can do this, it’s up to you.

> 2) Do I have to inserti this trick in the question title text box?

You can if you’d like, it’s not mandatory, it’s a suggested workaround. If you can come up with a workaround that solves this issue in a better way for yourself and your client, by all means please do so. I can imagine that a more elaborate solution might involve using the WP the_content() filter to do something like filtering out anything on the front end that’s in a special set of brackets.


Daniele Pavinato

February 7, 2014 at 10:54 am

Thanks, good suggestion!


Jonathan Wilson

February 8, 2014 at 12:52 pm

Hi Daniele,

Glad we could help. I am going to close this thread. If you need assistance with anything else, please start a new one and we will be happy to help there. 🙂

Viewing 12 reply threads

The support post ‘More than one questions group’ 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